Skip to content

Commit 6718780

Browse files
LOCALE_SYSTEM_DEFAULT is not the best choise
1 parent a5e8d3c commit 6718780

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ext/com_dotnet/com_extension.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ PHP_MINIT_FUNCTION(com_dotnet)
245245
COM_CONST(VARCMP_GT);
246246
COM_CONST(VARCMP_NULL);
247247
COM_CONST(LOCALE_SYSTEM_DEFAULT);
248+
COM_CONST(LOCALE_NEUTRAL);
248249

249250
COM_CONST(NORM_IGNORECASE);
250251
COM_CONST(NORM_IGNORENONSPACE);

ext/com_dotnet/com_handlers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name
326326

327327
if (SUCCEEDED(ITypeInfo_GetTypeComp(obj->typeinfo, &comp))) {
328328
olename = php_com_string_to_olestring(name->val, name->len, obj->code_page);
329-
lhash = LHashValOfNameSys(SYS_WIN32, LOCALE_SYSTEM_DEFAULT, olename);
329+
lhash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, olename);
330330

331331
if (SUCCEEDED(ITypeComp_Bind(comp, olename, lhash, INVOKE_FUNC, &TI, &kind, &bindptr))) {
332332
switch (kind) {
@@ -410,7 +410,7 @@ static int com_objects_compare(zval *object1, zval *object2)
410410
obja = CDNO_FETCH(object1);
411411
objb = CDNO_FETCH(object2);
412412

413-
switch (VarCmp(&obja->v, &objb->v, LOCALE_SYSTEM_DEFAULT, 0)) {
413+
switch (VarCmp(&obja->v, &objb->v, LOCALE_NEUTRAL, 0)) {
414414
case VARCMP_LT:
415415
ret = -1;
416416
break;

ext/com_dotnet/com_iterator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ zend_object_iterator *php_com_iter_get(zend_class_entry *ce, zval *object, int b
200200
} else {
201201
/* can we enumerate it? */
202202
if (FAILED(IDispatch_Invoke(V_DISPATCH(&obj->v), DISPID_NEWENUM,
203-
&IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD|DISPATCH_PROPERTYGET,
203+
&IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD|DISPATCH_PROPERTYGET,
204204
&dp, &v, NULL, NULL))) {
205205
goto fail;
206206
}

0 commit comments

Comments
 (0)