Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing const-s

  • Loading branch information...
commit 3237136c9728ad10be0c15ce1fb137a56e0978e1 1 parent df89689
@steveklabnik steveklabnik authored
View
8 shoes/app.c
@@ -117,7 +117,7 @@ shoes_app_window(int argc, VALUE *argv, VALUE self, VALUE owner)
VALUE attr = Qnil;
VALUE app = shoes_app_new(self == cDialog ? cDialog : cApp);
shoes_app *app_t;
- char *url = "/";
+ const char *url = "/";
Data_Get_Struct(app, shoes_app, app_t);
switch (rb_parse_args(argc, argv, "h,s|h,", &args))
@@ -248,7 +248,7 @@ shoes_app_start(VALUE allapps, char *uri)
}
shoes_code
-shoes_app_open(shoes_app *app, char *path)
+shoes_app_open(shoes_app *app, const char *path)
{
shoes_code code = SHOES_OK;
int dialog = (rb_obj_class(app->self) == cDialog);
@@ -348,7 +348,7 @@ shoes_app_exception(VALUE rb_exec, VALUE e)
}
shoes_code
-shoes_app_visit(shoes_app *app, char *path)
+shoes_app_visit(shoes_app *app, const char *path)
{
shoes_exec exec;
shoes_canvas *canvas;
@@ -474,7 +474,7 @@ shoes_sys(char *cmd, int detach)
}
shoes_code
-shoes_app_goto(shoes_app *app, char *path)
+shoes_app_goto(shoes_app *app, const char *path)
{
shoes_code code = SHOES_OK;
const char http_scheme[] = "http://";
View
7 shoes/app.h
@@ -62,9 +62,9 @@ VALUE shoes_app_get_fullscreen(VALUE);
VALUE shoes_app_set_fullscreen(VALUE, VALUE);
VALUE shoes_app_slot(VALUE);
shoes_code shoes_app_start(VALUE, char *);
-shoes_code shoes_app_open(shoes_app *, char *);
+shoes_code shoes_app_open(shoes_app *, const char *);
shoes_code shoes_app_loop(void);
-shoes_code shoes_app_visit(shoes_app *, char *);
+shoes_code shoes_app_visit(shoes_app *, const char *);
shoes_code shoes_app_paint(shoes_app *);
shoes_code shoes_app_motion(shoes_app *, int, int);
shoes_code shoes_app_click(shoes_app *, int, int, int);
@@ -75,12 +75,13 @@ shoes_code shoes_app_keypress(shoes_app *, VALUE);
shoes_code shoes_app_keyup(shoes_app *, VALUE);
VALUE shoes_app_close_window(shoes_app *);
VALUE shoes_sys(char *, int);
-shoes_code shoes_app_goto(shoes_app *, char *);
+shoes_code shoes_app_goto(shoes_app *, const char *);
shoes_code shoes_slot_repaint(SHOES_SLOT_OS *);
void shoes_app_reset_styles(shoes_app *);
void shoes_app_style(shoes_app *, VALUE, VALUE);
VALUE shoes_app_location(VALUE);
VALUE shoes_app_is_started(VALUE);
VALUE shoes_app_quit(VALUE);
+void shoes_app_title(shoes_app *, VALUE);
#endif
View
4 shoes/native.h
@@ -39,11 +39,11 @@ shoes_code shoes_app_cursor(shoes_app *, ID);
void shoes_native_app_resized(shoes_app *);
void shoes_native_app_title(shoes_app *, char *);
void shoes_native_app_fullscreen(shoes_app *, char);
-shoes_code shoes_native_app_open(shoes_app *, char *, int);
+shoes_code shoes_native_app_open(shoes_app *, const char *, int);
void shoes_native_app_show(shoes_app *);
void shoes_native_loop(void);
void shoes_native_app_close(shoes_app *);
-void shoes_browser_open(char *);
+void shoes_browser_open(const char *);
void shoes_slot_init(VALUE, SHOES_SLOT_OS *, int, int, int, int, int, int);
cairo_t *shoes_cairo_create(shoes_canvas *);
void shoes_slot_destroy(shoes_canvas *, shoes_canvas *);
View
4 shoes/native/cocoa.m
@@ -912,7 +912,7 @@ void shoes_native_remove_item(SHOES_SLOT_OS *slot, VALUE item, char c)
}
shoes_code
-shoes_native_app_open(shoes_app *app, char *path, int dialog)
+shoes_native_app_open(shoes_app *app, const char *path, int dialog)
{
shoes_code code = SHOES_OK;
app->os.normal = NSMakeRect(0, 0, app->width, app->height);
@@ -944,7 +944,7 @@ void shoes_native_remove_item(SHOES_SLOT_OS *slot, VALUE item, char c)
}
void
-shoes_browser_open(char *url)
+shoes_browser_open(const char *url)
{
VALUE browser = rb_str_new2("open ");
rb_str_cat2(browser, url);
View
4 shoes/native/gtk.c
@@ -544,7 +544,7 @@ shoes_native_app_fullscreen(shoes_app *app, char yn)
}
shoes_code
-shoes_native_app_open(shoes_app *app, char *path, int dialog)
+shoes_native_app_open(shoes_app *app, const char *path, int dialog)
{
char icon_path[SHOES_BUFSIZE];
shoes_app_gtk *gk = &app->os;
@@ -608,7 +608,7 @@ shoes_native_app_close(shoes_app *app)
}
void
-shoes_browser_open(char *url)
+shoes_browser_open(const char *url)
{
VALUE browser = rb_str_new2("/etc/alternatives/x-www-browser '");
rb_str_cat2(browser, url);
View
4 shoes/native/windows.c
@@ -1198,7 +1198,7 @@ shoes_native_app_fullscreen(shoes_app *app, char yn)
}
shoes_code
-shoes_native_app_open(shoes_app *app, char *path, int dialog)
+shoes_native_app_open(shoes_app *app, const char *path, int dialog)
{
shoes_code code = SHOES_OK;
LONG style;
@@ -1393,7 +1393,7 @@ shoes_native_app_close(shoes_app *app)
}
void
-shoes_browser_open(char *url)
+shoes_browser_open(const char *url)
{
ShellExecute(0, "open", url, 0, 0, 0);
}
Please sign in to comment.
Something went wrong with that request. Please try again.