diff options
Diffstat (limited to 'objectivec/Tests/GPBTestUtilities.h')
-rw-r--r-- | objectivec/Tests/GPBTestUtilities.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/objectivec/Tests/GPBTestUtilities.h b/objectivec/Tests/GPBTestUtilities.h index 44c80844..780184b0 100644 --- a/objectivec/Tests/GPBTestUtilities.h +++ b/objectivec/Tests/GPBTestUtilities.h @@ -39,6 +39,9 @@ @class TestUnpackedExtensions; @class GPBExtensionRegistry; +static inline NSData *DataFromCStr(const char *str) { + return [NSData dataWithBytes:str length:strlen(str)]; +} // Helper for uses of C arrays in tests cases. #ifndef GPBARRAYSIZE |