summaryrefslogtreecommitdiff
blob: f2e98a029aef90ba50b0f01bf1af878a3cf807f2 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
diff -ru a/ext/shout.c b/ext/shout.c
--- a/ext/shout.c	1970-01-01 01:00:00.000000000 +0100
+++ b/ext/shout.c	2008-10-06 12:28:08.000000000 +0200
@@ -40,6 +40,11 @@
 
 #define DEFAULT_MOUNTPOINT "/default"
 
+#ifndef RSTRING_LEN
+#define RSTRING_LEN(str)	RSTRING(str)->len
+#define RSTRING_PTR(str)	RSTRING(str)->ptr
+#endif
+
 /*
 ----------------- ShoutError --------------------
  */
@@ -233,8 +238,8 @@
         GET_SC(self, s);
 
         Check_SafeStr(to_send);
-        err = shout_send(s->conn, (unsigned char *) (RSTRING(to_send)->ptr),
-                                  RSTRING(to_send)->len);
+        err = shout_send(s->conn, (unsigned char *) (RSTRING_PTR(to_send)),
+                                  RSTRING_LEN(to_send));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -409,7 +414,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_host(s->conn, RSTRING(value)->ptr);
+        err = shout_set_host(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -435,7 +440,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_user(s->conn, RSTRING(value)->ptr);
+        err = shout_set_user(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -448,7 +453,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_password(s->conn, RSTRING(value)->ptr);
+        err = shout_set_password(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -495,7 +500,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_mount(s->conn, RSTRING(value)->ptr);
+        err = shout_set_mount(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -509,7 +514,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_dumpfile(s->conn, RSTRING(value)->ptr);
+        err = shout_set_dumpfile(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -523,7 +528,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_agent(s->conn, RSTRING(value)->ptr);
+        err = shout_set_agent(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -554,7 +559,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_name(s->conn, RSTRING(value)->ptr);
+        err = shout_set_name(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -567,7 +572,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_url(s->conn, RSTRING(value)->ptr);
+        err = shout_set_url(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -580,7 +585,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_genre(s->conn, RSTRING(value)->ptr);
+        err = shout_set_genre(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }
@@ -593,7 +598,7 @@
         shout_connection *s; GET_SC(self, s);
 
         Check_Type(value, T_STRING);
-        err = shout_set_description(s->conn, RSTRING(value)->ptr);
+        err = shout_set_description(s->conn, RSTRING_PTR(value));
         if(err != SHOUTERR_SUCCESS) {
                 raise_shout_error(s->conn);
         }