Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typofixes - code related #395

Closed
wants to merge 12 commits into from
2 changes: 1 addition & 1 deletion ext/odbc/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ PHP_ARG_WITH(custom-odbc,,
ODBC_LIBS=$CUSTOM_ODBC_LIBS
ODBC_TYPE=custom-odbc
AC_DEFINE(HAVE_CODBC,1,[ ])
AC_MSG_RESULT([$ext_ouput])
AC_MSG_RESULT([$ext_output])
fi
fi

Expand Down
4 changes: 2 additions & 2 deletions ext/standard/basic_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1789,8 +1789,8 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_number_format, 0, 0, 1)
ZEND_ARG_INFO(0, number)
ZEND_ARG_INFO(0, num_decimal_places)
ZEND_ARG_INFO(0, dec_seperator)
ZEND_ARG_INFO(0, thousands_seperator)
ZEND_ARG_INFO(0, dec_separator)
ZEND_ARG_INFO(0, thousands_separator)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_fmod, 0)
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/math.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ PHPAPI char *_php_math_number_format_ex(double d, int dec, char *dec_point,
}
/* }}} */

/* {{{ proto string number_format(float number [, int num_decimal_places [, string dec_seperator, string thousands_seperator]])
/* {{{ proto string number_format(float number [, int num_decimal_places [, string dec_separator, string thousands_separator]])
Formats a number with grouped thousands */
PHP_FUNCTION(number_format)
{
Expand Down
10 changes: 5 additions & 5 deletions ext/xml/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _qualify_namespace(XML_Parser parser, const xmlChar *name, const xmlChar *URI, x
if (URI) {
/* Use libxml functions otherwise its memory deallocation is screwed up */
*qualified = xmlStrdup(URI);
*qualified = xmlStrncat(*qualified, parser->_ns_seperator, 1);
*qualified = xmlStrncat(*qualified, parser->_ns_separator, 1);
*qualified = xmlStrncat(*qualified, name, xmlStrlen(name));
} else {
*qualified = xmlStrdup(name);
Expand Down Expand Up @@ -469,7 +469,7 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m
parser = (XML_Parser) emalloc(sizeof(struct _XML_Parser));
memset(parser, 0, sizeof(struct _XML_Parser));
parser->use_namespace = 0;
parser->_ns_seperator = NULL;
parser->_ns_separator = NULL;

parser->parser = xmlCreatePushParserCtxt((xmlSAXHandlerPtr) &php_xml_compat_handlers, (void *) parser, NULL, 0, NULL);
if (parser->parser == NULL) {
Expand All @@ -491,7 +491,7 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m
if (sep != NULL) {
parser->use_namespace = 1;
parser->parser->sax2 = 1;
parser->_ns_seperator = xmlStrdup(sep);
parser->_ns_separator = xmlStrdup(sep);
} else {
/* Reset flag as XML_SAX2_MAGIC is needed for xmlCreatePushParserCtxt
so must be set in the handlers */
Expand Down Expand Up @@ -770,8 +770,8 @@ PHPAPI void
XML_ParserFree(XML_Parser parser)
{
if (parser->use_namespace) {
if (parser->_ns_seperator) {
xmlFree(parser->_ns_seperator);
if (parser->_ns_separator) {
xmlFree(parser->_ns_separator);
}
}
if (parser->parser->myDoc) {
Expand Down
2 changes: 1 addition & 1 deletion ext/xml/expat_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ typedef struct _XML_Memory_Handling_Suite {
typedef struct _XML_Parser {
int use_namespace;

xmlChar *_ns_seperator;
xmlChar *_ns_separator;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid since this is an externally accessible structure, we can not just change the name. At least we'd have to have aliased #define for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about the solution in the next commit? (I couldn't test it...)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this probably would work


void *user;
xmlParserCtxtPtr parser;
Expand Down