Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37476715
en ru br
Репозитории ALT
S:4.1.1-alt7
5.1: 1.3.39-alt1
4.1: 1.3.31-alt2
4.0: 1.3.31-alt1
3.0: 1.3.24-alt2
www.altlinux.org/Changes

Группа :: Разработка/C
Пакет: swig

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: revert-Eliminate-some-temporary-buffers.patch
Скачать


diff --git a/Source/Modules/guile.cxx b/Source/Modules/guile.cxx
index 03e777cf4..d7d3da8fc 100644
--- a/Source/Modules/guile.cxx
+++ b/Source/Modules/guile.cxx
@@ -947,16 +947,20 @@ public:
 
 	if (!is_setter) {
 	  /* Strip off "-get" */
+	  char *pws_name = (char *) malloc(sizeof(char) * (len - 3));
+	  strncpy(pws_name, pc, len - 3);
+	  pws_name[len - 4] = 0;
 	  if (struct_member == 2) {
 	    /* There was a setter, so create a procedure with setter */
 	    Printf(f_init, "scm_c_define");
-	    Printf(f_init, "(\"%.*s\", " "scm_make_procedure_with_setter(getter, setter));\n", pc, len - 4);
+	    Printf(f_init, "(\"%s\", " "scm_make_procedure_with_setter(getter, setter));\n", pws_name);
 	  } else {
 	    /* There was no setter, so make an alias to the getter */
 	    Printf(f_init, "scm_c_define");
-	    Printf(f_init, "(\"%.*s\", getter);\n", pc, len - 4);
+	    Printf(f_init, "(\"%s\", getter);\n", pws_name);
 	  }
-	  Printf(exported_symbols, "\"%.*s\", ", pc, len - 4);
+	  Printf(exported_symbols, "\"%s\", ", pws_name);
+	  free(pws_name);
 	}
       } else {
 	/* Register the function */
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index 1f7ff044a..ebd788d35 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
@@ -471,7 +471,9 @@ static void getoptions(int argc, char *argv[]) {
 	Swig_mark_arg(i);
       } else if (strncmp(argv[i], "-I", 2) == 0) {
 	// Add a new directory search path
-	Swig_add_directory((String_or_char*)(argv[i] + 2));
+	char *a = Swig_copy_string(argv[i] + 2);
+	Swig_add_directory((DOH *) a);
+	free(a);
 	Swig_mark_arg(i);
       } else if (strncmp(argv[i], "-D", 2) == 0) {
 	String *d = NewString(argv[i] + 2);
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin