Beispiel #1
0
static PHP_MINIT_FUNCTION(phpdbg) /* {{{ */
{
	ZEND_INIT_MODULE_GLOBALS(phpdbg, php_phpdbg_globals_ctor, NULL);
	REGISTER_INI_ENTRIES();

#if PHP_VERSION_ID >= 50500
	zend_execute_old = zend_execute_ex;
	zend_execute_ex = phpdbg_execute_ex;
#else
	zend_execute_old = zend_execute;
	zend_execute = phpdbg_execute_ex;
#endif

	REGISTER_STRINGL_CONSTANT("PHPDBG_VERSION", PHPDBG_VERSION, sizeof(PHPDBG_VERSION)-1, CONST_CS|CONST_PERSISTENT);

	REGISTER_LONG_CONSTANT("PHPDBG_FILE",   FILE_PARAM, CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("PHPDBG_METHOD", METHOD_PARAM, CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("PHPDBG_LINENO", NUMERIC_PARAM, CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("PHPDBG_FUNC",   STR_PARAM, CONST_CS|CONST_PERSISTENT);

	REGISTER_LONG_CONSTANT("PHPDBG_COLOR_PROMPT", PHPDBG_COLOR_PROMPT, CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("PHPDBG_COLOR_NOTICE", PHPDBG_COLOR_NOTICE, CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("PHPDBG_COLOR_ERROR",  PHPDBG_COLOR_ERROR, CONST_CS|CONST_PERSISTENT);

	return SUCCESS;
} /* }}} */
Beispiel #2
0
/* {{{ void php_output_startup(void)
 * Set up module globals and initalize the conflict and reverse conflict hash tables */
PHPAPI void php_output_startup(void)
{
	ZEND_INIT_MODULE_GLOBALS(output, php_output_init_globals, NULL);
	zend_hash_init(&php_output_handler_aliases, 0, NULL, NULL, 1);
	zend_hash_init(&php_output_handler_conflicts, 0, NULL, NULL, 1);
	zend_hash_init(&php_output_handler_reverse_conflicts, 0, NULL, (void (*)(void *)) zend_hash_destroy, 1);
}
Beispiel #3
0
static PHP_MINIT_FUNCTION(phpdbg_webhelper) /* {{{ */
{
	if (!strcmp(sapi_module.name, PHPDBG_NAME)) {
		return SUCCESS;
	}

	ZEND_INIT_MODULE_GLOBALS(phpdbg_webhelper, php_phpdbg_webhelper_globals_ctor, NULL);
	REGISTER_INI_ENTRIES();

	return SUCCESS;
} /* }}} */
Beispiel #4
0
static ZEND_MINIT_FUNCTION(msgpack)
{
    ZEND_INIT_MODULE_GLOBALS(msgpack, msgpack_init_globals, NULL);

    REGISTER_INI_ENTRIES();

#if HAVE_PHP_SESSION
    php_session_register_serializer("msgpack",
                                    PS_SERIALIZER_ENCODE_NAME(msgpack),
                                    PS_SERIALIZER_DECODE_NAME(msgpack));
#endif

    msgpack_init_class();

    return SUCCESS;
}
Beispiel #5
0
static ZEND_MINIT_FUNCTION(msgpack)
{
    ZEND_INIT_MODULE_GLOBALS(msgpack, msgpack_init_globals, NULL);

    REGISTER_INI_ENTRIES();


//    msgpack_init_class();

#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 1)
    REGISTER_LONG_CONSTANT(
        "MESSAGEPACK_OPT_PHPONLY", MSGPACK_CLASS_OPT_PHPONLY,
        CONST_CS | CONST_PERSISTENT);
#endif

    return SUCCESS;
}
Beispiel #6
0
/* {{{ PHP_MINIT_FUNCTION
 */
static PHP_MINIT_FUNCTION(uopz)
{
	ZEND_INIT_MODULE_GLOBALS(uopz, php_uopz_init_globals, NULL);

	REGISTER_LONG_CONSTANT("ZEND_ACC_PUBLIC", 				ZEND_ACC_PUBLIC, 				CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("ZEND_ACC_PRIVATE", 				ZEND_ACC_PRIVATE,				CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("ZEND_ACC_PROTECTED", 			ZEND_ACC_PROTECTED,				CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("ZEND_ACC_PPP_MASK", 			ZEND_ACC_PPP_MASK,				CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("ZEND_ACC_STATIC", 				ZEND_ACC_STATIC,				CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("ZEND_ACC_FINAL", 				ZEND_ACC_FINAL,					CONST_CS|CONST_PERSISTENT);
	REGISTER_LONG_CONSTANT("ZEND_ACC_ABSTRACT", 			ZEND_ACC_ABSTRACT,				CONST_CS|CONST_PERSISTENT);

	uopz_executors_init();
	uopz_handlers_init();

	return SUCCESS;
}
Beispiel #7
0
static ZEND_MINIT_FUNCTION(msgpack) /* {{{ */
{
    ZEND_INIT_MODULE_GLOBALS(msgpack, msgpack_init_globals, NULL);

    REGISTER_INI_ENTRIES();

#if HAVE_PHP_SESSION
    php_session_register_serializer("msgpack", PS_SERIALIZER_ENCODE_NAME(msgpack), PS_SERIALIZER_DECODE_NAME(msgpack));
#endif

    msgpack_init_class();

    REGISTER_LONG_CONSTANT("MESSAGEPACK_OPT_PHPONLY",
            MSGPACK_CLASS_OPT_PHPONLY, CONST_CS | CONST_PERSISTENT);

    return SUCCESS;
}
Beispiel #8
0
static PHP_MINIT_FUNCTION(win32service)
{
	if (strcmp(sapi_module.name, "cli") != 0) {
		zend_error(E_CORE_WARNING, "The Win32Service extension is only available when using the CLI SAPI");
		return FAILURE;
	}

	ZEND_INIT_MODULE_GLOBALS(win32service, init_globals, NULL);

#define MKCONST(x)	REGISTER_LONG_CONSTANT("WIN32_" # x, x, CONST_CS|CONST_PERSISTENT)

	/* Constants used in communication with the SCM */

	/* dwServiceType */
	/* MKCONST(SERVICE_KERNEL_DRIVER);                 /* 0x00000001 Driver service. */
	/* MKCONST(SERVICE_FILE_SYSTEM_DRIVER);            /* 0x00000002 File system driver service. */
	/* MKCONST(SERVICE_ADAPTER);                       /* 0x00000004 Reserved. */
	/* MKCONST(SERVICE_RECOGNIZER_DRIVER);             /* 0x00000008 Reserved. */
	MKCONST(SERVICE_WIN32_OWN_PROCESS);                /* 0x00000010 Service that runs in its own process. */
	/* MKCONST(SERVICE_WIN32_SHARE_PROCESS);           /* 0x00000020 Service that shares a process with one or more other services. */
	MKCONST(SERVICE_INTERACTIVE_PROCESS);              /* 0x00000100 The service can interact with the desktop. */
	MKCONST(SERVICE_WIN32_OWN_PROCESS_INTERACTIVE);    /* 0x00000110 Service that runs in its own process and interacts with the desktop. */

	/* dwCurrentState */
	MKCONST(SERVICE_CONTINUE_PENDING);                 /* 0x00000005 The service continue is pending. */
	MKCONST(SERVICE_PAUSE_PENDING);                    /* 0x00000006 The service pause is pending. */
	MKCONST(SERVICE_PAUSED);                           /* 0x00000007 The service is paused. */
	MKCONST(SERVICE_RUNNING);                          /* 0x00000004 The service is running. */
	MKCONST(SERVICE_START_PENDING);                    /* 0x00000002 The service is starting. */
	MKCONST(SERVICE_STOP_PENDING);                     /* 0x00000003 The service is stopping. */
	MKCONST(SERVICE_STOPPED);                          /* 0x00000001 The service is not running. */

	/* dwControl */
	MKCONST(SERVICE_CONTROL_CONTINUE);                 /* 0x00000003 Notifies a paused service that it should resume. */
	/* MKCONST(SERVICE_CONTROL_DEVICEEVENT);           /* 0x0000000B */
	/* MKCONST(SERVICE_CONTROL_HARDWAREPROFILECHANGE); /* 0x0000000C */
	MKCONST(SERVICE_CONTROL_INTERROGATE);              /* 0x00000004 Notifies a service that it should report its current status information to the service control manager. */
	/* MKCONST(SERVICE_CONTROL_NETBINDADD);            /* 0x00000007 Notifies a network service that there is a new component for binding. */
	/* MKCONST(SERVICE_CONTROL_NETBINDDISABLE);        /* 0x0000000A Notifies a network service that one of its bindings has been disabled. */
	/* MKCONST(SERVICE_CONTROL_NETBINDENABLE);         /* 0x00000009 Notifies a network service that a disabled binding has been enabled. */
	/* MKCONST(SERVICE_CONTROL_NETBINDREMOVE);         /* 0x00000008 Notifies a network service that a component for binding has been removed. */
	/* MKCONST(SERVICE_CONTROL_PARAMCHANGE);           /* 0x00000006 Notifies a service that its startup parameters have changed. */
	MKCONST(SERVICE_CONTROL_PAUSE);                    /* 0x00000002 Notifies a service that it should pause. */
	/* MKCONST(SERVICE_CONTROL_POWEREVENT);            /* 0x0000000D */
	MKCONST(SERVICE_CONTROL_PRESHUTDOWN);              /* 0x0000000F Notifies a service that the system will be shutting down.
	                                                                 Services that need additional time to perform cleanup tasks beyond the tight time restriction at system shutdown can use this notification.
	                                                                 The service control manager sends this notification to applications that have registered for it before sending a SERVICE_CONTROL_SHUTDOWN notification to applications that have registered for that notification.
	                                                                 A service that handles this notification blocks system shutdown until the service stops or the preshutdown time-out interval specified through SERVICE_PRESHUTDOWN_INFO expires.
	                                                                 Because this affects the user experience, services should use this feature only if it is absolutely necessary to avoid data loss or significant recovery time at the next system start.
	                                                                 Windows Server 2003 and Windows XP/2000:  This value is not supported. */
	/* MKCONST(SERVICE_CONTROL_SESSIONCHANGE);         /* 0x0000000E */
	MKCONST(SERVICE_CONTROL_SHUTDOWN);                 /* 0x00000005 Notifies a service that the system is shutting down so the service can perform cleanup tasks.
	                                                                 Note that services that register for SERVICE_CONTROL_PRESHUTDOWN notifications cannot receive this notification because they have already stopped.
	                                                                 If a service accepts this control code, it must stop after it performs its cleanup tasks and return NO_ERROR.
	                                                                 After the SCM sends this control code, it will not send other control codes to the service. */
	MKCONST(SERVICE_CONTROL_STOP);                     /* 0x00000001 Notifies a service that it should stop. */

	/* dwControlsAccepted */
	/* MKCONST(SERVICE_ACCEPT_HARDWAREPROFILECHANGE);  /* 0x00000020 The service is notified when the computer's hardware profile has changed.
	                                                                 This enables the system to send SERVICE_CONTROL_HARDWAREPROFILECHANGE notifications to the service. */
	/* MKCONST(SERVICE_ACCEPT_NETBINDCHANGE);          /* 0x00000010 The service is a network component that can accept changes in its binding without being stopped and restarted.
	                                                                 This control code allows the service to receive SERVICE_CONTROL_NETBINDADD, SERVICE_CONTROL_NETBINDREMOVE, SERVICE_CONTROL_NETBINDENABLE, and SERVICE_CONTROL_NETBINDDISABLE notifications. */
	/* MKCONST(SERVICE_ACCEPT_PARAMCHANGE);            /* 0x00000008 The service can reread its startup parameters without being stopped and restarted.
	                                                                 This control code allows the service to receive SERVICE_CONTROL_PARAMCHANGE notifications. */
	MKCONST(SERVICE_ACCEPT_PAUSE_CONTINUE);            /* 0x00000002 The service can be paused and continued.
	                                                                 This control code allows the service to receive SERVICE_CONTROL_PAUSE and SERVICE_CONTROL_CONTINUE notifications. */
	/* MKCONST(SERVICE_ACCEPT_POWEREVENT);             /* 0x00000040 The service is notified when the computer's power status has changed.
	                                                                 This enables the system to send SERVICE_CONTROL_POWEREVENT notifications to the service. */
	MKCONST(SERVICE_ACCEPT_PRESHUTDOWN);               /* 0x00000100 The service can perform preshutdown tasks.
	                                                                 This control code enables the service to receive SERVICE_CONTROL_PRESHUTDOWN notifications.
	                                                                 Note that ControlService and ControlServiceEx cannot send this notification; only the system can send it.
	                                                                 Windows Server 2003 and Windows XP/2000:  This value is not supported. */
	/* MKCONST(SERVICE_ACCEPT_SESSIONCHANGE);          /* 0x00000080 The service is notified when the computer's session status has changed.
	                                                                 This enables the system to send SERVICE_CONTROL_SESSIONCHANGE notifications to the service.
	                                                                 Windows 2000:  This value is not supported. */
	MKCONST(SERVICE_ACCEPT_SHUTDOWN);                  /* 0x00000004 The service is notified when system shutdown occurs.
	                                                                 This control code allows the service to receive SERVICE_CONTROL_SHUTDOWN notifications.
	                                                                 Note that ControlService and ControlServiceEx cannot send this notification; only the system can send it. */
	MKCONST(SERVICE_ACCEPT_STOP);                      /* 0x00000001 The service can be stopped.
	                                                                 This control code allows the service to receive SERVICE_CONTROL_STOP notifications. */
	/* MKCONST(SERVICE_ACCEPT_TIMECHANGE);             /* 0x00000200 The service is notified when the system time has changed.
	                                                                 This enables the system to send SERVICE_CONTROL_TIMECHANGE notifications to the service.
	                                                                 Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000:  This control code is not supported. */
	/* MKCONST(SERVICE_ACCEPT_TRIGGEREVENT);           /* 0x00000400 The service is notified when an event for which the service has registered occurs.
	                                                                 This enables the system to send SERVICE_CONTROL_TRIGGEREVENT notifications to the service.
	                                                                 Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000:  This control code is not supported. */

	/* dwStartType */
	/* MKCONST(SERVICE_BOOT_START);                    /* 0x00000000 A device driver started by the system loader. This value is valid only for driver services. */
	/* MKCONST(SERVICE_SYSTEM_START);                  /* 0x00000001 A device driver started by the IoInitSystem function. This value is valid only for driver services. */
	MKCONST(SERVICE_AUTO_START);                       /* 0x00000002 A service started automatically by the service control manager during system startup. */
	MKCONST(SERVICE_DEMAND_START);                     /* 0x00000003 A service started by the service control manager when a process calls the StartService function. */
	MKCONST(SERVICE_DISABLED);                         /* 0x00000004 A service that cannot be started. Attempts to start the service result in the error code ERROR_SERVICE_DISABLED. */

	/* dwErrorControl */
	MKCONST(SERVICE_ERROR_IGNORE);                     /* 0x00000000 The startup program ignores the error and continues the startup operation. */
	MKCONST(SERVICE_ERROR_NORMAL);                     /* 0x00000001 The startup program logs the error in the event log but continues the startup operation. */
	/* MKCONST(SERVICE_ERROR_SEVERE);                  /* 0x00000002 The startup program logs the error in the event log.
	                                                                 If the last-known-good configuration is being started, the startup operation continues. Otherwise, the system is restarted with the last-known-good configuration. */
	/* MKCONST(SERVICE_ERROR_CRITICAL);                /* 0x00000003 The startup program logs the error in the event log, if possible.
	                                                                 If the last-known-good configuration is being started, the startup operation fails. Otherwise, the system is restarted with the last-known good configuration. */

	/* dwServiceFlags */
	MKCONST(SERVICE_RUNS_IN_SYSTEM_PROCESS);           /* 0x00000001 The service runs in a system process that must always be running. */

	/* Error constants generated in communication with the SCM */
	MKCONST(ERROR_ACCESS_DENIED);                      /* 0x00000005 The handle to the SCM database does not have the appropriate access rights. */
	MKCONST(ERROR_CIRCULAR_DEPENDENCY);                /* 0x00000423 A circular service dependency was specified. */
	MKCONST(ERROR_DATABASE_DOES_NOT_EXIST);            /* 0x00000429 The specified database does not exist. */
	MKCONST(ERROR_DEPENDENT_SERVICES_RUNNING);         /* 0x0000041B The service cannot be stopped because other running services are dependent on it. */
	MKCONST(ERROR_DUPLICATE_SERVICE_NAME);             /* 0x00000436 The display name already exists in the service control manager database either as a service name or as another display name. */
	MKCONST(ERROR_FAILED_SERVICE_CONTROLLER_CONNECT);  /* 0x00000427 The service process could not connect to the service controller. */
	MKCONST(ERROR_INSUFFICIENT_BUFFER);                /* 0x0000007A The buffer is too small for the SERVICE_STATUS_PROCESS structure. Nothing was written to the structure. */
	MKCONST(ERROR_INVALID_DATA);                       /* 0x0000000D The specified service status structure is invalid. */
	MKCONST(ERROR_INVALID_HANDLE);                     /* 0x00000006 The handle to the specified service control manager database is invalid. */
	MKCONST(ERROR_INVALID_LEVEL);                      /* 0x0000007C The InfoLevel parameter contains an unsupported value. */
	MKCONST(ERROR_INVALID_NAME);                       /* 0x0000007B The specified service name is invalid. */
	MKCONST(ERROR_INVALID_PARAMETER);                  /* 0x00000057 A parameter that was specified is invalid (CreateService) or the cbSize member of SERVICE_STATUS_PROCESS is not valid (QueryServiceStatusEx). */
	MKCONST(ERROR_INVALID_SERVICE_ACCOUNT);            /* 0x00000421 The user account name specified in the lpServiceStartName parameter does not exist. */
	MKCONST(ERROR_INVALID_SERVICE_CONTROL);            /* 0x0000041C The requested control code is not valid, or it is unacceptable to the service. */
	MKCONST(ERROR_PATH_NOT_FOUND);                     /* 0x00000003 The service binary file could not be found. */
	MKCONST(ERROR_SERVICE_ALREADY_RUNNING);            /* 0x00000420 An instance of the service is already running. */
	MKCONST(ERROR_SERVICE_CANNOT_ACCEPT_CTRL);         /* 0x00000425 The requested control code cannot be sent to the service because the state of the service is SERVICE_STOPPED, SERVICE_START_PENDING, or SERVICE_STOP_PENDING. */
	MKCONST(ERROR_SERVICE_DATABASE_LOCKED);            /* 0x0000041F The database is locked. */
	MKCONST(ERROR_SERVICE_DEPENDENCY_DELETED);         /* 0x00000433 The service depends on a service that does not exist or has been marked for deletion. */
	MKCONST(ERROR_SERVICE_DEPENDENCY_FAIL);            /* 0x0000042C The service depends on another service that has failed to start. */
	MKCONST(ERROR_SERVICE_DISABLED);                   /* 0x00000422 The service has been disabled. */
	MKCONST(ERROR_SERVICE_DOES_NOT_EXIST);             /* 0x00000424 The specified service does not exist as an installed service. */
	MKCONST(ERROR_SERVICE_EXISTS);                     /* 0x00000431 The specified service already exists in this database. */
	MKCONST(ERROR_SERVICE_LOGON_FAILED);               /* 0x0000042D The service did not start due to a logon failure. This error occurs if the service is configured to run under an account that does not have the "Log on as a service" right. */
	MKCONST(ERROR_SERVICE_MARKED_FOR_DELETE);          /* 0x00000430 The specified service has already been marked for deletion. */
	MKCONST(ERROR_SERVICE_NO_THREAD);                  /* 0x0000041E A thread could not be created for the service. */
	MKCONST(ERROR_SERVICE_NOT_ACTIVE);                 /* 0x00000426 The service has not been started. */
	MKCONST(ERROR_SERVICE_REQUEST_TIMEOUT);            /* 0x0000041D The process for the service was started, but it did not call StartServiceCtrlDispatcher, or the thread that called StartServiceCtrlDispatcher may be blocked in a control handler function. */
	MKCONST(ERROR_SHUTDOWN_IN_PROGRESS);               /* 0x0000045B The system is shutting down; this function cannot be called. */
	MKCONST(NO_ERROR);                                 /* 0x00000000 No error. */

	/* Win32 Priority Constants */
	MKCONST(ABOVE_NORMAL_PRIORITY_CLASS);              /* 0x00008000 Process that has priority above NORMAL_PRIORITY_CLASS but below HIGH_PRIORITY_CLASS. */
	MKCONST(BELOW_NORMAL_PRIORITY_CLASS);              /* 0x00004000 Process that has priority above IDLE_PRIORITY_CLASS but below NORMAL_PRIORITY_CLASS. */
	MKCONST(HIGH_PRIORITY_CLASS);                      /* 0x00000080 Process that performs time-critical tasks that must be executed immediately. The threads of the process preempt the threads of normal or idle priority class processes. An example is the Task List, which must respond quickly when called by the user, regardless of the load on the operating system. Use extreme care when using the high-priority class, because a high-priority class application can use nearly all available CPU time. */
	MKCONST(IDLE_PRIORITY_CLASS);                      /* 0x00000040 Process whose threads run only when the system is idle. The threads of the process are preempted by the threads of any process running in a higher priority class. An example is a screen saver. The idle-priority class is inherited by child processes. */
	MKCONST(NORMAL_PRIORITY_CLASS);                    /* 0x00000020 Process with no special scheduling needs. */
	MKCONST(REALTIME_PRIORITY_CLASS);                  /* 0x00000100 Process that has the highest possible priority. The threads of the process preempt the threads of all other processes, including operating system processes performing important tasks. For example, a real-time process that executes for more than a very brief interval can cause disk caches not to flush or cause the mouse to be unresponsive. */

	return SUCCESS;
}
Beispiel #9
0
/* {{{ PHP_MINIT_FUNCTION */
static PHP_MINIT_FUNCTION(yaml)
{
#if ZEND_EXTENSION_API_NO < 220060519
  ZEND_INIT_MODULE_GLOBALS(yaml, php_yaml_init_globals, NULL)
#endif
  REGISTER_INI_ENTRIES();

  /* node style constants */
  REGISTER_LONG_CONSTANT("YAML_ANY_SCALAR_STYLE",
      YAML_ANY_SCALAR_STYLE, CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_PLAIN_SCALAR_STYLE",
      YAML_PLAIN_SCALAR_STYLE, CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_SINGLE_QUOTED_SCALAR_STYLE",
      YAML_SINGLE_QUOTED_SCALAR_STYLE, CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_DOUBLE_QUOTED_SCALAR_STYLE",
      YAML_DOUBLE_QUOTED_SCALAR_STYLE, CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_LITERAL_SCALAR_STYLE",
      YAML_LITERAL_SCALAR_STYLE, CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_FOLDED_SCALAR_STYLE",
      YAML_FOLDED_SCALAR_STYLE, CONST_PERSISTENT | CONST_CS);

  /* tag constants */
  REGISTER_STRING_CONSTANT("YAML_NULL_TAG", YAML_NULL_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_BOOL_TAG", YAML_BOOL_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_STR_TAG", YAML_STR_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_INT_TAG", YAML_INT_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_FLOAT_TAG", YAML_FLOAT_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_TIMESTAMP_TAG", YAML_TIMESTAMP_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_SEQ_TAG", YAML_SEQ_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_MAP_TAG", YAML_MAP_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_PHP_TAG", YAML_PHP_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_MERGE_TAG", YAML_MERGE_TAG,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_STRING_CONSTANT("YAML_BINARY_TAG", YAML_BINARY_TAG,
      CONST_PERSISTENT | CONST_CS);

  /* encoding constants */
  REGISTER_LONG_CONSTANT("YAML_ANY_ENCODING", YAML_ANY_ENCODING,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_UTF8_ENCODING", YAML_UTF8_ENCODING,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_UTF16LE_ENCODING", YAML_UTF16LE_ENCODING,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_UTF16BE_ENCODING", YAML_UTF16BE_ENCODING,
      CONST_PERSISTENT | CONST_CS);

  /* linebreak constants */
  REGISTER_LONG_CONSTANT("YAML_ANY_BREAK", YAML_ANY_BREAK,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_CR_BREAK", YAML_CR_BREAK,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_LN_BREAK", YAML_LN_BREAK,
      CONST_PERSISTENT | CONST_CS);
  REGISTER_LONG_CONSTANT("YAML_CRLN_BREAK", YAML_CRLN_BREAK,
      CONST_PERSISTENT | CONST_CS);

  return SUCCESS;
}