diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-12-07 13:12:25 -0800 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-12-07 13:12:25 -0800 |
commit | 80c8a16fb145f7ed4867d31fad3c22318a1ce708 (patch) | |
tree | f7605cdb86d653efaac761363ed596dd6b2e0459 /Examples/FunctionVoid | |
parent | 964d6274b0eba38df43d77b87c44bd728d2f0fb5 (diff) |
replaces tabs in source code with regular spaces, added example for working with global variables
Diffstat (limited to 'Examples/FunctionVoid')
-rw-r--r-- | Examples/FunctionVoid/functionvoid.cpp | 28 | ||||
-rw-r--r-- | Examples/FunctionVoid/functionvoid.php | 10 |
2 files changed, 19 insertions, 19 deletions
diff --git a/Examples/FunctionVoid/functionvoid.cpp b/Examples/FunctionVoid/functionvoid.cpp index f4386ea..91b7bb3 100644 --- a/Examples/FunctionVoid/functionvoid.cpp +++ b/Examples/FunctionVoid/functionvoid.cpp @@ -1,12 +1,12 @@ /** - * functionvoid.cpp - * @author Jasper van Eck<jasper.vaneck@copernica.com> + * functionvoid.cpp + * @author Jasper van Eck<jasper.vaneck@copernica.com> * - * An example file to show the working of a void function call. + * An example file to show the working of a void function call. */ /** - * Libraries used. + * Libraries used. */ #include <iostream> #include <phpcpp.h> @@ -17,27 +17,27 @@ using namespace std; /** - * my_function_void() + * my_function_void() */ void my_function_void() { - cout << "In my_function_void()" << endl; + cout << "In my_function_void()" << endl; } // Symbols are exported according to the "C" language extern "C" { - // export the "get_module" function that will be called by the Zend engine - PHPCPP_EXPORT void *get_module() - { - // create extension + // export the "get_module" function that will be called by the Zend engine + PHPCPP_EXPORT void *get_module() + { + // create extension static Php::Extension extension("my_function_void","1.0"); // add function to extension extension.add("my_void_function", my_function_void); - - // return the extension module - return extension.module(); - } + + // return the extension module + return extension.module(); + } } diff --git a/Examples/FunctionVoid/functionvoid.php b/Examples/FunctionVoid/functionvoid.php index e6fbb67..d057f92 100644 --- a/Examples/FunctionVoid/functionvoid.php +++ b/Examples/FunctionVoid/functionvoid.php @@ -1,13 +1,13 @@ <?php /* - * functionvoid.php - * @author Jasper van Eck<jasper.vaneck@copernica.com> + * functionvoid.php + * @author Jasper van Eck<jasper.vaneck@copernica.com> * - * An example file to show the working of a void function call. + * An example file to show the working of a void function call. */ /* - * Run the function with the given name. As you can see, the given name - * can be different from the actual function name. + * Run the function with the given name. As you can see, the given name + * can be different from the actual function name. */ my_void_function(); |