printf: handle old GST_PTR_FORMAT %P and GST_SEGMENT_FORMAT %Q defines too
authorTim-Philipp Müller <tim@centricular.net>
Sun, 7 Apr 2013 16:02:55 +0000 (17:02 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 12 Apr 2013 22:05:57 +0000 (23:05 +0100)
For binary backwards compatibility.

gst/printf/printf-parse.c

index 1502053..fc7b4d5 100644 (file)
@@ -387,6 +387,13 @@ printf_parse (const char *format, char_directives * d, arguments * a)
               c = 's';
               break;
 #endif
+              /* Old GST_PTR_FORMAT, handle for binary backwards compatibility */
+            case 'P':
+              type = TYPE_POINTER_EXT;
+              dp->flags |= FLAG_PTR_EXT;
+              dp->ptr_ext_char = 'A';
+              dp->conversion = 'p';
+              break;
             case 'p':
               /* Note: cp points already to the char after the 'p' now */
               if (cp[0] == POINTER_EXT_SIGNIFIER_CHAR && cp[1] != '\0') {
@@ -400,6 +407,13 @@ printf_parse (const char *format, char_directives * d, arguments * a)
                 type = TYPE_POINTER;
               }
               break;
+              /* Old GST_SEGMENT_FORMAT, handle for backwards compatibility */
+            case 'Q':
+              type = TYPE_POINTER_EXT;
+              dp->flags |= FLAG_PTR_EXT;
+              dp->ptr_ext_char = 'B';
+              dp->conversion = 'p';
+              break;
             case 'n':
 #ifdef HAVE_LONG_LONG
               if (flags >= 16 || (flags & 4))