Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
TSRM fix for ext_skel - probably more needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rlerdorf committed Aug 2, 2001
1 parent 3aa5674 commit 8cf4e4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.EXT_SKEL
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ CURRENT LIMITATIONS, BUGS AND OTHER ODDITIES
It can't handle correctly, and probably never will, variable list of
of arguments. (void foo(int bar [, ...])

Don't trust too much the generated code. It tries to be useful in most of
the situations you might encounter, but automatic code generating will never
Don't trust the generated code too much. It tries to be useful in most of
the situations you might encounter, but automatic code generation will never
beat a programmer who knows the real situation at hand. ext_skel is generally
best suited for quickly generating a wrapper for c-library functions you
might want to have available in PHP too.
Expand All @@ -154,7 +154,7 @@ PHP_FUNCTION(my_drawtext)
int argc;
int image_id = -1;
int font_id = -1;
???LS_FETCH();
TSRMLS_FETCH();

argc = ZEND_NUM_ARGS();
if (argc < 5 || argc > 6 || zend_get_parameters_ex(argc, &image, &text, &font, &x, &y, &color) == FAILURE) {
Expand Down
2 changes: 1 addition & 1 deletion ext/skeleton/create_stubs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ END {
fetchargs = fetchargs ") == FAILURE)" closefetch "{\n\t\tZEND_WRONG_PARAM_COUNT();\n\t}\n"
}
if (assign_params) funcvals = ints doubles floats strings
if (resources) funcvals = funcvals "\t???LS_FETCH();\n"
if (resources) funcvals = funcvals "\tTSRMLS_FETCH();\n"
if (useswitch[i]) {
if (check_argc_in_switch[i]) {
check_argc = "\t\tdefault:\n\t\t\tZEND_WRONG_PARAM_COUNT();\n"
Expand Down

0 comments on commit 8cf4e4a

Please sign in to comment.