Changeset 62449 in vbox for trunk/src/libs/xpcom18a4/xpcom
- Timestamp:
- Jul 22, 2016 2:54:18 PM (8 years ago)
- Location:
- trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h
r29118 r62449 165 165 166 166 /* 167 * Return a pointer to the start of the base filename of path 168 */ 169 const char * 167 * Return a newly allocated string to the start of the base filename of path. 168 * Free with g_free(). 169 */ 170 char * 170 171 xpidl_basename(const char * path); 171 172 -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c
r1 r62449 61 61 header_prolog(TreeState *state) 62 62 { 63 c onst char *define = xpidl_basename(state->basename);63 char *define = xpidl_basename(state->basename); 64 64 fprintf(state->file, "/*\n * DO NOT EDIT. THIS FILE IS GENERATED FROM" 65 65 " %s.idl\n */\n", state->basename); … … 68 68 "#define __gen_%s_h__\n", 69 69 define, define); 70 g_free(define); 70 71 if (state->base_includes != NULL) { 71 72 guint len = g_slist_length(state->base_includes); … … 117 118 header_epilog(TreeState *state) 118 119 { 119 c onst char *define = xpidl_basename(state->basename);120 char *define = xpidl_basename(state->basename); 120 121 fprintf(state->file, "\n#endif /* __gen_%s_h__ */\n", define); 122 g_free(define); 121 123 return TRUE; 122 124 } -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c
r62265 r62449 733 733 if (strcmp(outname, "-")) { 734 734 const char *fopen_mode; 735 c onst char *out_basename;735 char *out_basename; 736 736 737 737 /* explicit_output_filename can't be true without a filename */ … … 753 753 #endif 754 754 real_outname = g_strdup_printf("%s.%s", out_basename, mode->suffix); 755 if (out_basename != outname) 756 g_free(out_basename); 755 757 } 756 758 -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_java.c
r29724 r62449 98 98 "\n" 99 99 , ext - basename >= 19 ? 19 : (int)(ext - basename), basename); 100 g_free(basename); 100 101 #else 101 102 fputs("/*\n * ************* DO NOT EDIT THIS FILE ***********\n", … … 358 359 java_prolog(state); 359 360 } 361 g_free(basename); 360 362 } 361 363 -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_util.c
r40504 r62449 833 833 * Return a pointer to the start of the base filename of path 834 834 */ 835 c onst char *835 char * 836 836 xpidl_basename(const char * path) 837 837 { 838 c onst char * result = g_basename(path);838 char * result = g_path_get_basename(path); 839 839 /* 840 840 *If this is windows then we'll handle either / or \ as a separator … … 842 842 */ 843 843 #if defined(XP_WIN32) 844 # error adapt regarding g_basename() vs. g_path_get_basename()! 844 845 const char * slash = strrchr(path, '/'); 845 846 /* If we found a slash and its after the current default OS separator */
Note:
See TracChangeset
for help on using the changeset viewer.