summaryrefslogtreecommitdiff
path: root/games/awele/files/patch-awelewish.c
blob: aab3b9270cfa1980055665ca2d624bdc34dd5e50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- awelewish.c.orig	2013-07-08 14:02:50.000000000 +0200
+++ awelewish.c	2013-07-08 14:04:38.000000000 +0200
@@ -40,7 +40,7 @@
 {
     int level ;
     if ( argc !=3 ) {
-	interp->result = "wrong number of args in function setlevel" ;
+	Tcl_SetObjResult(interp, Tcl_NewStringObj("wrong number of args in function setlevel", -1));
 	return TCL_ERROR ;
     }
     sprintf(levelname , "%s" , argv[1]);
@@ -62,7 +62,7 @@
     AWELE *a ;
 
     if ( argc !=2 ) {
-	interp->result = "wrong number of args in function computer_play" ;
+	Tcl_SetObjResult(interp, Tcl_NewStringObj("wrong number of args in function computer_play", -1));
 	return TCL_ERROR ;
     }
     a = create_awele() ;
@@ -84,7 +84,7 @@
     AWELE *a ;
 
     if ( argc !=2 ) {
-	interp->result = "wrong number of args in function computer_rand_play" ;
+	Tcl_SetObjResult(interp, Tcl_NewStringObj("wrong number of args in function computer_rand_play", -1));
 	return TCL_ERROR ;
     }
     a = create_awele() ;
@@ -105,7 +105,7 @@
     AWELE *a ;
     int prof , cp , oldcp ;    
     if ( argc !=3 ) {
-	interp->result = "wrong number of args in function human_play" ;
+	Tcl_SetObjResult(interp, Tcl_NewStringObj("wrong number of args in function human_play", -1));
 	return TCL_ERROR ;
     }
     if ( Tcl_GetInt( interp , argv[1] , &cp ) != TCL_OK )