From c58149bc451a0d5db32ca8719e0ed0f4ea410fc3 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Sat, 27 Mar 2021 19:59:30 +1300 Subject: [PATCH] Simplify printing code a little Remove unused Printf parameter, and use Printv where it's more readable. --- Source/Modules/php.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index ae200d3ff..9077e0a81 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -1171,8 +1171,8 @@ public: Printf(f->code, " if(!arg) SWIG_PHP_Error(E_ERROR, \"this pointer is NULL\");\n\n"); Printf(f->code, " arg2 = Z_STR(args[0]);\n\n"); - Printf(f->code, "if (!arg2) {\n RETVAL_NULL();\n}\n",magic_set); - Printf(f->code, "%s\n",magic_set); + Printf(f->code, "if (!arg2) {\n RETVAL_NULL();\n}\n"); + Printv(f->code, magic_set, "\n", NIL); Printf(f->code, "\nelse if (strcmp(arg2->val,\"thisown\") == 0) {\n"); Printf(f->code, "arg->newobject = zval_get_long(&args[1]);\n}\n\n"); Printf(f->code, "else {\n");