From a95a84390ee43237d8df7d43021a48417de119f1 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Sun, 10 Mar 2013 10:17:59 -0700 Subject: [PATCH] Update IDL generators for int64 and extprofiles changes --- hphp/idl/base.php | 2 +- hphp/idl/class_map.php | 2 +- hphp/idl/continuation.idl.php | 2 +- hphp/idl/icu_ucnv.idl.php | 2 +- hphp/idl/idl_list.php | 2 ++ hphp/idl/intl.idl.php | 2 +- hphp/idl/memcached.idl.php | 2 +- hphp/idl/simplexml.idl.php | 2 +- hphp/idl/soap.idl.php | 2 +- 9 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hphp/idl/base.php b/hphp/idl/base.php index 53d5d009122..1158018d471 100644 --- a/hphp/idl/base.php +++ b/hphp/idl/base.php @@ -35,7 +35,7 @@ $TYPENAMES = array 'idlname' => 'Boolean', 'phpname' => 'bool'), Int32 => array('name' => 'int', 'enum' => 'Int32', 'idlname' => 'Int32', 'phpname' => 'int'), - Int64 => array('name' => 'int64', 'enum' => 'Int64', + Int64 => array('name' => 'int64_t', 'enum' => 'Int64', 'idlname' => 'Int64', 'phpname' => 'int'), Double => array('name' => 'double', 'enum' => 'Double', 'idlname' => 'Double', 'phpname' => 'float'), diff --git a/hphp/idl/class_map.php b/hphp/idl/class_map.php index a446a7387cf..40375ec2d0a 100644 --- a/hphp/idl/class_map.php +++ b/hphp/idl/class_map.php @@ -197,7 +197,7 @@ function printDataType($t, $off = 0) { switch (typename($t)) { case 'bool': $s = 'KindOfBoolean'; $n = 9; break; case 'int': - case 'int64': $s = 'KindOfInt64'; $n = 10; break; + case 'int64_t':$s = 'KindOfInt64'; $n = 10; break; case 'double': $s = 'KindOfDouble'; $n = 11; break; case 'String': $s = 'KindOfString'; $n = 20; break; case 'Array': $s = 'KindOfArray'; $n = 32; break; diff --git a/hphp/idl/continuation.idl.php b/hphp/idl/continuation.idl.php index e2bf69a5ffd..117fd2be450 100644 --- a/hphp/idl/continuation.idl.php +++ b/hphp/idl/continuation.idl.php @@ -187,7 +187,7 @@ public: public: Object m_obj; Array m_args; - int64 m_index; + int64_t m_index; Variant m_value; Variant m_received; String m_origFuncName; diff --git a/hphp/idl/icu_ucnv.idl.php b/hphp/idl/icu_ucnv.idl.php index 42f36b9f33d..3de231a63f1 100644 --- a/hphp/idl/icu_ucnv.idl.php +++ b/hphp/idl/icu_ucnv.idl.php @@ -46,7 +46,7 @@ BeginClass( intl_error &err); static bool setSubstChars(String chars, UConverter *cnv, intl_error &err); bool setCallback(UConverter *cnv); - Variant defaultCallback(int64 reason, VRefParam error); + Variant defaultCallback(int64_t reason, VRefParam error); static String doConvert(CStrRef str, UConverter *toCnv, UConverter *fromCnv, intl_error &err); public: diff --git a/hphp/idl/idl_list.php b/hphp/idl/idl_list.php index b5e090353a2..950bb69cf92 100644 --- a/hphp/idl/idl_list.php +++ b/hphp/idl/idl_list.php @@ -28,6 +28,8 @@ foreach ($files as $file) { fwrite($f, "RUN_TESTSUITE(TestExt$ucname);\n"); break; case 'ext': + $path = $prefix ?: "runtime/ext"; + fwrite($f, "#include <$path/ext_$name.h>\n"); break; } } diff --git a/hphp/idl/intl.idl.php b/hphp/idl/intl.idl.php index 1bbe77da1c5..20566b80767 100644 --- a/hphp/idl/intl.idl.php +++ b/hphp/idl/intl.idl.php @@ -15,7 +15,7 @@ DefinePreamble(<< #include // icu namespace HPHP { -extern const int64 q_Collator\$\$SORT_REGULAR; +extern const int64_t q_Collator\$\$SORT_REGULAR; } CPP ); diff --git a/hphp/idl/memcached.idl.php b/hphp/idl/memcached.idl.php index 87c60d3fef2..d0bf15bcfe7 100644 --- a/hphp/idl/memcached.idl.php +++ b/hphp/idl/memcached.idl.php @@ -125,7 +125,7 @@ BeginClass( CStrRef key, CVarRef value, int expiration); typedef memcached_return_t (*IncDecOperation)(memcached_st *, const char *, size_t, uint32_t, uint64_t *); - Variant incDecOperationImpl(IncDecOperation op, CStrRef key, int64 offset); + Variant incDecOperationImpl(IncDecOperation op, CStrRef key, int64_t offset); typedef std::map ImplMap; static DECLARE_THREAD_LOCAL(ImplMap, s_persistentMap); diff --git a/hphp/idl/simplexml.idl.php b/hphp/idl/simplexml.idl.php index e2ba2446fae..40499bc424f 100644 --- a/hphp/idl/simplexml.idl.php +++ b/hphp/idl/simplexml.idl.php @@ -286,7 +286,7 @@ BeginClass( bool m_is_children; bool m_is_property; virtual bool o_toBoolean() const; - virtual int64 o_toInt64() const; + virtual int64_t o_toInt64() const; virtual double o_toDouble() const; virtual Array o_toArray() const; virtual Variant *___lval(Variant v_name); diff --git a/hphp/idl/soap.idl.php b/hphp/idl/soap.idl.php index fb78f76206c..63863a48ee5 100644 --- a/hphp/idl/soap.idl.php +++ b/hphp/idl/soap.idl.php @@ -618,7 +618,7 @@ BeginClass( 'footer' => <<