Created
March 10, 2014 20:25
-
-
Save simonwelsh/9473564 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From e14402b5ef7e906721647450640d2d5e96bc016a Mon Sep 17 00:00:00 2001 | |
From: Simon Welsh <[email protected]> | |
Date: Tue, 11 Mar 2014 09:23:21 +1300 | |
Subject: [PATCH] Update C*Ref argument types to const versions | |
--- | |
hphp/tools/check_native_signatures.php | 12 ++++++------ | |
1 file changed, 6 insertions(+), 6 deletions(-) | |
diff --git a/hphp/tools/check_native_signatures.php b/hphp/tools/check_native_signatures.php | |
index baffe43..7fbcc11 100644 | |
--- a/hphp/tools/check_native_signatures.php | |
+++ b/hphp/tools/check_native_signatures.php | |
@@ -161,7 +161,7 @@ function match_arg_type(string $php, string $cpp): bool { | |
$php = substr($php, 1); | |
} | |
if ($php[0] == '?') { | |
- $expected = 'CVarRef'; | |
+ $expected = 'const Variant&'; | |
} else { | |
switch (strtolower($php)) { | |
case 'bool': | |
@@ -183,27 +183,27 @@ function match_arg_type(string $php, string $cpp): bool { | |
$expected = 'const String&'; | |
break; | |
case 'array': | |
- $expected = 'CArrRef'; | |
+ $expected = 'const Array*'; | |
break; | |
case 'resource': | |
- $expected = 'CResRef'; | |
+ $expected = 'const Resource&'; | |
break; | |
case 'mixed': | |
case 'callable': | |
- $expected = 'CVarRef'; | |
+ $expected = 'const Variant&'; | |
break; | |
case 'actrec': | |
$expected = 'ActRec*'; | |
break; | |
case 'object': | |
default: | |
- $expected = 'CObjRef'; | |
+ $expected = 'const Object&'; | |
break; | |
} | |
} | |
// References must be a variant type | |
if ($php[strlen($php)-1] == '&') { | |
- if ($expected != 'CVarRef') { | |
+ if ($expected != 'const Variant&') { | |
return false; | |
} else { | |
$expected = 'VRefParam'; | |
-- | |
1.8.5.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment