You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

62 lines
1.3 KiB

#ifndef __RKPHP_COMMON_H
#define __RKPHP_COMMON_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "ext/standard/info.h"
#ifdef ZTS
#include "TSRM.h"
#endif
#ifdef HAVE_DEBUG
#define RKPHP_DEBUG 1
#else
#define RKPHP_DEBUG 0
#endif
#define RKPHP_NAME "rkphp.so" // Make sure to include .so
#define RKPHP_VERSION "0.0.1"
extern ZEND_API HashTable module_registry;
extern zend_module_entry rkphp_module_entry;
#define phpext_rkphp_me_ptr &rkphp_module_entry;
ZEND_BEGIN_MODULE_GLOBALS(rkphp)
int rkphp_glob;
ZEND_END_MODULE_GLOBALS(rkphp)
PHP_FUNCTION(rkphp_ex);
PHP_MINIT_FUNCTION(rkphp);
PHP_MSHUTDOWN_FUNCTION(rkphp);
PHP_RINIT_FUNCTION(rkphp);
PHP_RSHUTDOWN_FUNCTION(rkphp);
#if RKPHP_DEBUG == 1
#if ZEND_MODULE_API_NO >= 20010901
PHP_MINFO_FUNCTION(rkphp);
#endif
#endif
// Custom printf macro to strip all debug messages on compile-time
// Removes debugging strings from appearing during runtime & in the binary
#if RKPHP_DEBUG == 1
#define RKPHP_PRINTF(...) php_printf(__VA_ARGS__);
#else
#define RKPHP_PRINTF(...) ((void)0);
#endif
#endif /* rkphp_common.h */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/