Skip to content

Commit 80bd148

Browse files
committed
Merge branch 'pull-request/1235'
* pull-request/1235: modify skeleton confirm_extname_compiled modify skeleton.c function
2 parents cb9f58d + 73a0c96 commit 80bd148

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ext/skeleton/skeleton.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,15 @@ PHP_FUNCTION(confirm_extname_compiled)
3737
{
3838
char *arg = NULL;
3939
size_t arg_len, len;
40-
char *strg;
40+
zend_string *strg;
4141

4242
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &arg, &arg_len) == FAILURE) {
4343
return;
4444
}
4545

46-
len = spprintf(&strg, 0, "Congratulations! You have successfully modified ext/%.78s/config.m4. Module %.78s is now compiled into PHP.", "extname", arg);
46+
strg = strpprintf(0, "Congratulations! You have successfully modified ext/%.78s/config.m4. Module %.78s is now compiled into PHP.", "extname", arg);
4747

48-
RETVAL_STRINGL(strg, len);
49-
efree(strg);
48+
RETURN_STR(strg);
5049
}
5150
/* }}} */
5251
/* The previous line is meant for vim and emacs, so it can correctly fold and

0 commit comments

Comments
 (0)