summaryrefslogtreecommitdiff
path: root/upb/upb.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2015-05-08 17:30:22 -0700
committerJoshua Haberman <jhaberman@gmail.com>2015-05-08 17:30:22 -0700
commitccc0fd0dbbcebb43f4d85d7df1439e1fc7993bf8 (patch)
treeda3cbc97eed1eb70af5e0f3a687ff37ad239d119 /upb/upb.h
parentbd7ea8c6f1854aa37b7792c6f23334ffc0fd94ff (diff)
parent838009ba2b8ea1e99061c66e0fbd9cb53a96ec20 (diff)
Merge pull request #18 from haberman/google-internal
Sync from Google-internal development.
Diffstat (limited to 'upb/upb.h')
-rw-r--r--upb/upb.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/upb/upb.h b/upb/upb.h
index 3744ea6..13efaed 100644
--- a/upb/upb.h
+++ b/upb/upb.h
@@ -25,6 +25,15 @@
#define UPB_INLINE static inline
#endif
+// For use in C/C++ source files (not headers), forces inlining within the file.
+#ifdef __GNUC__
+#define UPB_FORCEINLINE inline __attribute__((always_inline))
+#define UPB_NOINLINE __attribute__((noinline))
+#else
+#define UPB_FORCEINLINE
+#define UPB_NOINLINE
+#endif
+
#if __STDC_VERSION__ >= 199901L
#define UPB_C99
#endif
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback