95 lines
2.9 KiB
Diff
95 lines
2.9 KiB
Diff
--- a/src/icu.ustring.c.orig
|
|
+++ b/src/icu.ustring.c
|
|
@@ -38,7 +38,7 @@
|
|
target_limit = target + ICU4LUA_UBUFFERSIZE;
|
|
for (;;) {
|
|
status = U_ZERO_ERROR;
|
|
- ucnv_toUnicode(conv, &target, target_limit, &source, source_limit, NULL, TRUE, &status);
|
|
+ ucnv_toUnicode(conv, &target, target_limit, &source, source_limit, NULL, 1, &status);
|
|
switch(status) {
|
|
case U_ZERO_ERROR:
|
|
icu4lua_addusize(&build_buffer, target - temp_buffer);
|
|
@@ -100,7 +100,7 @@
|
|
|
|
for (;;) {
|
|
status = U_ZERO_ERROR;
|
|
- ucnv_fromUnicode(conv, &target, target_limit, &source, source_limit, NULL, TRUE, &status);
|
|
+ ucnv_fromUnicode(conv, &target, target_limit, &source, source_limit, NULL, 1, &status);
|
|
switch(status) {
|
|
case U_BUFFER_OVERFLOW_ERROR:
|
|
luaL_addsize(&build_buffer, (const char*)target - (const char*)temp_buffer);
|
|
@@ -691,7 +691,7 @@
|
|
lua_pushboolean(L, u_strCompare(
|
|
icu4lua_trustustring(L,1), (int32_t)icu4lua_ustrlen(L,1),
|
|
icu4lua_trustustring(L,2), (int32_t)icu4lua_ustrlen(L,2),
|
|
- TRUE
|
|
+ 1
|
|
) < 0);
|
|
return 1;
|
|
}
|
|
@@ -703,7 +703,7 @@
|
|
lua_pushboolean(L, u_strCompare(
|
|
icu4lua_trustustring(L,1), (int32_t)icu4lua_ustrlen(L,1),
|
|
icu4lua_trustustring(L,2), (int32_t)icu4lua_ustrlen(L,2),
|
|
- TRUE
|
|
+ 1
|
|
) <= 0);
|
|
return 1;
|
|
}
|
|
@@ -733,7 +733,7 @@
|
|
lua_pushboolean(L, u_strCompare(
|
|
icu4lua_trustustring(L,1), (int32_t)icu4lua_ustrlen(L,1),
|
|
icu4lua_trustustring(L,2), (int32_t)icu4lua_ustrlen(L,2),
|
|
- TRUE
|
|
+ 1
|
|
) < 0);
|
|
}
|
|
return 1;
|
|
@@ -759,7 +759,7 @@
|
|
lua_pushboolean(L, u_strCompare(
|
|
icu4lua_trustustring(L,1), (int32_t)icu4lua_ustrlen(L,1),
|
|
icu4lua_trustustring(L,2), (int32_t)icu4lua_ustrlen(L,2),
|
|
- TRUE
|
|
+ 1
|
|
) <= 0);
|
|
}
|
|
return 1;
|
|
@@ -785,7 +785,7 @@
|
|
lua_pushboolean(L, u_strCompare(
|
|
icu4lua_trustustring(L,1), (int32_t)icu4lua_ustrlen(L,1),
|
|
icu4lua_trustustring(L,2), (int32_t)icu4lua_ustrlen(L,2),
|
|
- TRUE
|
|
+ 1
|
|
) == 0);
|
|
}
|
|
return 1;
|
|
--- a/src/icu.utf8.c.orig
|
|
+++ b/src/icu.utf8.c
|
|
@@ -730,7 +730,7 @@
|
|
UCharIterator iter_b;
|
|
uiter_setUTF8(&iter_a, utf8_a, (int32_t)a_len);
|
|
uiter_setUTF8(&iter_b, utf8_b, (int32_t)b_len);
|
|
- lua_pushboolean(L, u_strCompareIter(&iter_a, &iter_b, TRUE) < 0);
|
|
+ lua_pushboolean(L, u_strCompareIter(&iter_a, &iter_b, 1) < 0);
|
|
}
|
|
return 1;
|
|
}
|
|
@@ -746,7 +746,7 @@
|
|
UCharIterator iter_b;
|
|
uiter_setUTF8(&iter_a, utf8_a, (int32_t)a_len);
|
|
uiter_setUTF8(&iter_b, utf8_b, (int32_t)b_len);
|
|
- lua_pushboolean(L, u_strCompareIter(&iter_a, &iter_b, TRUE) <= 0);
|
|
+ lua_pushboolean(L, u_strCompareIter(&iter_a, &iter_b, 1) <= 0);
|
|
}
|
|
return 1;
|
|
}
|
|
@@ -764,7 +764,7 @@
|
|
UCharIterator iter_b;
|
|
uiter_setUTF8(&iter_a, utf8_a, (int32_t)a_len);
|
|
uiter_setUTF8(&iter_b, utf8_b, (int32_t)b_len);
|
|
- lua_pushboolean(L, u_strCompareIter(&iter_a, &iter_b, TRUE) == 0);
|
|
+ lua_pushboolean(L, u_strCompareIter(&iter_a, &iter_b, 1) == 0);
|
|
}
|
|
return 1;
|
|
}
|