コード例 #1
0
ファイル: gmp.c プロジェクト: consynia/php-src
ZEND_DECLARE_MODULE_GLOBALS(gmp)
static ZEND_GINIT_FUNCTION(gmp);

/* {{{ gmp_functions[]
 */
const zend_function_entry gmp_functions[] = {
	ZEND_FE(gmp_init,		arginfo_gmp_init)
	ZEND_FE(gmp_intval,		arginfo_gmp_intval)
	ZEND_FE(gmp_strval,		arginfo_gmp_strval)
	ZEND_FE(gmp_add,		arginfo_gmp_binary)
	ZEND_FE(gmp_sub,		arginfo_gmp_binary)
	ZEND_FE(gmp_mul,		arginfo_gmp_binary)
	ZEND_FE(gmp_div_qr,		arginfo_gmp_div)
	ZEND_FE(gmp_div_q,		arginfo_gmp_div)
	ZEND_FE(gmp_div_r,		arginfo_gmp_div)
	ZEND_FALIAS(gmp_div, gmp_div_q, arginfo_gmp_div)
	ZEND_FE(gmp_mod,		arginfo_gmp_binary)
	ZEND_FE(gmp_divexact,	arginfo_gmp_binary)
	ZEND_FE(gmp_neg,		arginfo_gmp_unary)
	ZEND_FE(gmp_abs,		arginfo_gmp_unary)
	ZEND_FE(gmp_fact,		arginfo_gmp_unary)
	ZEND_FE(gmp_sqrt,		arginfo_gmp_unary)
	ZEND_FE(gmp_sqrtrem,	arginfo_gmp_unary)
	ZEND_FE(gmp_root,		arginfo_gmp_root)
	ZEND_FE(gmp_rootrem,	arginfo_gmp_root)
	ZEND_FE(gmp_pow,		arginfo_gmp_pow)
	ZEND_FE(gmp_powm,		arginfo_gmp_powm)
	ZEND_FE(gmp_perfect_square,	arginfo_gmp_unary)
	ZEND_FE(gmp_prob_prime, arginfo_gmp_prob_prime)
	ZEND_FE(gmp_gcd,		arginfo_gmp_binary)
	ZEND_FE(gmp_gcdext,		arginfo_gmp_binary)
コード例 #2
0
  #ifdef HAVE_CONFIG_H
    #include "config.h"
  #endif

  #include "php.h"
  #include "php_murmurhash3.h"
}

#include "MurmurHash3.h"

#define MURMURHASH3_128_OUTPUT_LENGTH 16
#define MURMURHASH3_32_OUTPUT_LENGTH  4


static zend_function_entry murmurhash3_functions[] = {
    ZEND_FALIAS(murmurhash3, murmurhash3_128, NULL)
    ZEND_FE(murmurhash3_128, NULL)
    ZEND_FE(murmurhash3_32, NULL)
    {NULL, NULL, NULL}
};

zend_module_entry murmurhash3_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
    STANDARD_MODULE_HEADER,
#endif
    PHP_MURMURHASH3_EXTNAME,
    murmurhash3_functions,
    NULL,
    NULL,
    NULL,
    NULL,
コード例 #3
0
ファイル: msgpack.c プロジェクト: laiello/php-msgpack
    "msgpack.error_display", "1", PHP_INI_ALL, OnUpdateBool,
    error_display, zend_msgpack_globals, msgpack_globals)
STD_PHP_INI_BOOLEAN(
    "msgpack.php_only", "1", PHP_INI_ALL, OnUpdateBool,
    php_only, zend_msgpack_globals, msgpack_globals)
STD_PHP_INI_BOOLEAN(
    "msgpack.illegal_key_insert", "0", PHP_INI_ALL, OnUpdateBool,
    illegal_key_insert, zend_msgpack_globals, msgpack_globals)
PHP_INI_END()

PS_SERIALIZER_FUNCS(msgpack);

static const zend_function_entry msgpack_functions[] = {
    ZEND_FE(msgpack_serialize, arginfo_msgpack_serialize)
    ZEND_FE(msgpack_unserialize, arginfo_msgpack_unserialize)
    ZEND_FALIAS(msgpack_pack, msgpack_serialize, arginfo_msgpack_serialize)
    ZEND_FALIAS(msgpack_unpack, msgpack_unserialize, arginfo_msgpack_unserialize)
    {NULL, NULL, NULL}
};

static void msgpack_init_globals(zend_msgpack_globals *msgpack_globals)
{
    TSRMLS_FETCH();

    if (PG(display_errors))
    {
        msgpack_globals->error_display = 1;
    }
    else
    {
        msgpack_globals->error_display = 0;
コード例 #4
0
ファイル: PyClasses.cpp プロジェクト: tantra35/PyRender
	add_property_zval(return_value, "dbconn", dbconnres);
	ZVAL_DELREF(dbconnres);
};

ZEND_FUNCTION(CPHPPyContext_get_data)
{
	IPyCountext* server_context = (IPyCountext*)SG(server_context);
	CSimpleTypeVar var;

	server_context->get_data(&var);
	get_item_helper(return_value, &var, TSRMLS_C);	
};

static zend_function_entry CPHPPyContext_methods[] =
{
	ZEND_FALIAS(get_connection, CPHPPyContext_get_connection, NULL)
	ZEND_FALIAS(get_data, CPHPPyContext_get_data, NULL)
	{NULL, NULL, NULL}
};

//-----------------------------------------------------------------------------
ZEND_FUNCTION(CPHPPyDbConnection_commit)
{
	IDbConnection* dbconn;
	zval** dbconn_rid;

	if(zend_hash_find(Z_OBJPROP_P(this_ptr), "dbconn", 7, (void**)&dbconn_rid) == SUCCESS)
	{
		ZEND_FETCH_RESOURCE(dbconn, IDbConnection*, dbconn_rid, -1, NULL, g_dbconnrtype);

		if(dbconn)