Skip to content

Instantly share code, notes, and snippets.

@morrisonlevi
Created November 29, 2014 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morrisonlevi/cedf8e03bb4d33d82e57 to your computer and use it in GitHub Desktop.
Save morrisonlevi/cedf8e03bb4d33d82e57 to your computer and use it in GitHub Desktop.
PHP ext/collections skeleton not linking
PHP_ARG_ENABLE(collections, whether to enable Collections support,
[ --enable-collections Enable Collections support])
if test "$PHP_COLLECTIONS" = "yes"; then
AC_DEFINE(HAVE_COLLECTIONS, 1, [Whether you have Collections support])
PHP_NEW_EXTENSION(collections, collections.c, $ext_shared)
fi
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_collections.h"
zend_module_entry collections_module_entry = {
STANDARD_MODULE_HEADER,
PHP_COLLECTIONS_EXTNAME,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
PHP_COLLECTIONS_VERSION,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_COLLECTIONS
ZEND_GET_MODULE(collections)
#endif
#ifndef PHP_COLLECTIONS_H
#define PHP_COLLECTIONS_H 1
#define PHP_COLLECTIONS_VERSION "0.1.0"
#define PHP_COLLECTIONS_EXTNAME "collections"
extern zend_module_entry collections_module_entry;
#define phpext_collections_ptr &collections_module_entry
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment