]> git.sur5r.net Git - cc65/blobdiff - src/ca65/spool.h
More lineinfo usage.
[cc65] / src / ca65 / spool.h
index ceec3662db3e3af1e2252b93c3d6bca09e1a8f5d..517320e0d8aedc838bfd1fbf7fc552d6cc54e620 100644 (file)
@@ -59,24 +59,44 @@ extern StringPool StrPool;
 
 
 
+#if defined(HAVE_INLINE)
+INLINE unsigned GetStrBufId (const StrBuf* S)
+/* Return the id of the given string buffer */
+{
+    return SP_Add (&StrPool, S);
+}
+#else
+#  define GetStrBufId(S)        SP_Add (&StrPool, (S))
+#endif
+
 #if defined(HAVE_INLINE)
 INLINE unsigned GetStringId (const char* S)
 /* Return the id of the given string */
 {
-    return SP_Add (&StrPool, S);
+    return SP_AddStr (&StrPool, S);
 }
 #else
-#  define GetStringId(S)        SP_Add (&StrPool, (S))
+#  define GetStringId(S)        SP_AddStr (&StrPool, (S))
 #endif
 
 #if defined(HAVE_INLINE)
-INLINE const char* GetString (unsigned Index)
+INLINE const StrBuf* GetStrBuf (unsigned Index)
 /* Convert a string index into a string */
 {
     return SP_Get (&StrPool, Index);
 }
 #else
-#  define GetString(Index)      SP_Get (&StrPool, (Index))
+#  define GetStrBuf(Index)      SP_Get (&StrPool, (Index))
+#endif
+
+#if defined(HAVE_INLINE)
+INLINE const char* GetString (unsigned Index)
+/* Convert a string index into a string */
+{
+    return SB_GetConstBuf (SP_Get (&StrPool, Index));
+}
+#else
+#  define GetString(Index)      SB_GetConstBuf (SP_Get (&StrPool, (Index)))
 #endif
 
 void WriteStrPool (void);