homer6 / php-ext-example-with-cpp Goto Github PK
View Code? Open in Web Editor NEWThe source code of Paul Osman's article on writing PHP 5 extensions with C++ classes.
Home Page: http://devzone.zend.com/article/4486
The source code of Paul Osman's article on writing PHP 5 extensions with C++ classes.
Home Page: http://devzone.zend.com/article/4486
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc:28:1: error: ‘zend_object_value’ does not name a type
zend_object_value car_create_handler(zend_class_entry *type TSRMLS_DC)
^
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc: In function ‘void zim_Car___construct(zend_execute_data*, zval*)’:
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc:60:82: error: ‘zend_object_store_get_object’ was not declared in this scope
car_object *obj = (car_object *)zend_object_store_get_object(object TSRMLS_CC);
^
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc: In function ‘void zim_Car_accelerate(zend_execute_data*, zval*)’:
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc:73:28: error: ‘zend_object_store_get_object’ was not declared in this scope
getThis() TSRMLS_CC);
^
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc: In function ‘void zim_Car_getCurrentSpeed(zend_execute_data*, zval*)’:
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc:89:28: error: ‘zend_object_store_get_object’ was not declared in this scope
getThis() TSRMLS_CC);
^
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc: At global scope:
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc:102:1: error: ‘function_entry’ does not name a type
function_entry car_methods[] = {
^
In file included from /usr/local/include/php/main/php.h:39:0,
from /home/zephir-app/new/myapp/php-ext-example-with-cpp/php_vehicles.h:12,
from /home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc:1:
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc: In function ‘int zm_startup_vehicles(int, int)’:
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc:116:33: error: ‘car_methods’ was not declared in this scope
INIT_CLASS_ENTRY(ce, "Car", car_methods);
^
/usr/local/include/php/Zend/zend_API.h:226:53: note: in definition of macro ‘INIT_CLASS_ENTRY_INIT_METHODS’
class_container.info.internal.builtin_functions = functions; \
^
/usr/local/include/php/Zend/zend_API.h:230:2: note: in expansion of macro ‘INIT_OVERLOADED_CLASS_ENTRY_EX’
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions, handle_fcall, handle_propget, h
^
/usr/local/include/php/Zend/zend_API.h:181:2: note: in expansion of macro ‘INIT_OVERLOADED_CLASS_ENTRY’
INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, NULL, NULL, NULL)
^
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc:116:5: note: in expansion of macro ‘INIT_CLASS_ENTRY’
INIT_CLASS_ENTRY(ce, "Car", car_methods);
^
/home/zephir-app/new/myapp/php-ext-example-with-cpp/vehicles.cc:118:29: error: ‘car_create_handler’ was not declared in this scope
car_ce->create_object = car_create_handler;
^
Makefile:194: recipe for target 'vehicles.lo' failed
make: *** [vehicles.lo] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.