@@ -86,7 +86,7 @@ class node_php_embed::PhpRequestWorker : public AsyncMessageWorker {
8686 // Can't call zend_clear_exception because there isn't a current
8787 // execution stack (ie, `EG(current_execute_data)`)
8888 zval *e = EG (exception);
89- EG (exception) = NULL ;
89+ EG (exception) = nullptr ;
9090 convert_to_string (e);
9191 SetErrorMessage (Z_STRVAL_P (e));
9292 zval_ptr_dtor (&e);
@@ -113,10 +113,10 @@ class node_php_embed::PhpRequestWorker : public AsyncMessageWorker {
113113 }
114114 void AfterExecute (TSRMLS_D) override {
115115 TRACE (" > PhpRequestWorker" );
116- NODE_PHP_EMBED_G (worker) = NULL ;
117- NODE_PHP_EMBED_G (channel) = NULL ;
116+ NODE_PHP_EMBED_G (worker) = nullptr ;
117+ NODE_PHP_EMBED_G (channel) = nullptr ;
118118 TRACE (" - request shutdown" );
119- php_request_shutdown (NULL );
119+ php_request_shutdown (nullptr );
120120 TRACE (" < PhpRequestWorker" );
121121 }
122122 // Executed when the async work is complete.
@@ -261,10 +261,10 @@ static void node_php_embed_register_server_variables(
261261 // Allow the JS function to be asynchronous.
262262 node_php_embed::node_php_jswait_create (wait.Ptr () TSRMLS_CC);
263263 // Now invoke the JS function, passing in the wrapper
264- zval *r = NULL ;
264+ zval *r = nullptr ;
265265 zend_call_method_with_2_params (init_func.PtrPtr (),
266- Z_OBJCE_P (init_func.Ptr ()), NULL , " __invoke " ,
267- &r, server.Ptr (), wait.Ptr ());
266+ Z_OBJCE_P (init_func.Ptr ()), nullptr ,
267+ " __invoke " , &r, server.Ptr (), wait.Ptr ());
268268 if (EG (exception)) {
269269 NPE_ERROR (" Exception in server init function" );
270270 zend_clear_exception (TSRMLS_C);
@@ -279,7 +279,8 @@ NAN_METHOD(setIniPath) {
279279 if (php_embed_module.php_ini_path_override ) {
280280 free (php_embed_module.php_ini_path_override );
281281 }
282- php_embed_module.php_ini_path_override = (*iniPath) ? strdup (*iniPath) : NULL ;
282+ php_embed_module.php_ini_path_override =
283+ (*iniPath) ? strdup (*iniPath) : nullptr ;
283284 TRACE (" <" );
284285}
285286
@@ -318,8 +319,8 @@ PHP_MINFO_FUNCTION(node_php_embed) {
318319
319320static void node_php_embed_globals_ctor (
320321 zend_node_php_embed_globals *node_php_embed_globals TSRMLS_DC) {
321- node_php_embed_globals->worker = NULL ;
322- node_php_embed_globals->channel = NULL ;
322+ node_php_embed_globals->worker = nullptr ;
323+ node_php_embed_globals->channel = nullptr ;
323324}
324325static void node_php_embed_globals_dtor (
325326 zend_node_php_embed_globals *node_php_embed_globals TSRMLS_DC) {
@@ -339,17 +340,17 @@ PHP_MINIT_FUNCTION(node_php_embed) {
339340zend_module_entry node_php_embed_module_entry = {
340341 STANDARD_MODULE_HEADER,
341342 " node-php-embed" , /* extension name */
342- NULL , /* function entries */
343+ nullptr , /* function entries */
343344 PHP_MINIT (node_php_embed), /* MINIT */
344- NULL , /* MSHUTDOWN */
345- NULL , /* RINIT */
346- NULL , /* RSHUTDOWN */
345+ nullptr , /* MSHUTDOWN */
346+ nullptr , /* RINIT */
347+ nullptr , /* RSHUTDOWN */
347348 PHP_MINFO (node_php_embed), /* MINFO */
348349 NODE_PHP_EMBED_VERSION,
349350 ZEND_MODULE_GLOBALS (node_php_embed),
350351 (void (*)(void * TSRMLS_DC))node_php_embed_globals_ctor,
351352 (void (*)(void * TSRMLS_DC))node_php_embed_globals_dtor,
352- NULL , /* post deactivate func */
353+ nullptr , /* post deactivate func */
353354 STANDARD_MODULE_PROPERTIES_EX
354355};
355356
@@ -366,22 +367,22 @@ static void node_php_embed_ensure_init(void) {
366367 }
367368 TRACE (" >" );
368369 node_php_embed_inited = true ;
369- char *argv[] = { NULL };
370+ char *argv[] = { nullptr };
370371 int argc = 0 ;
371372 php_embed_init (argc, argv PTSRMLS_CC);
372373 // Shutdown the initially-created request; we'll create our own request
373374 // objects inside PhpRequestWorker.
374- php_request_shutdown (NULL );
375- node::AtExit (ModuleShutdown, NULL );
375+ php_request_shutdown (nullptr );
376+ node::AtExit (ModuleShutdown, nullptr );
376377 TRACE (" <" );
377378}
378379
379380NAN_MODULE_INIT (ModuleInit) {
380381 TRACE (" >" );
381- php_embed_module.php_ini_path_override = NULL ;
382+ php_embed_module.php_ini_path_override = nullptr ;
382383 php_embed_module.php_ini_ignore = true ;
383384 php_embed_module.php_ini_ignore_cwd = true ;
384- php_embed_module.ini_defaults = NULL ;
385+ php_embed_module.ini_defaults = nullptr ;
385386 php_embed_module.startup = node_php_embed_startup;
386387 php_embed_module.send_header = node_php_embed_send_header;
387388 php_embed_module.ub_write = node_php_embed_ub_write;
0 commit comments