2nd better API implementation is as follows?
```c
static VALUE
rg_add(int argc, VALUE *argv, VALUE self)
{
    VALUE rb_widget, rb_name, rb_title;
    GtkWidget* child_widget;
    const gchar *name = NULL, *title = NULL;

    rb_scan_args(argc, argv, "03", &rb_widget, &rb_name, &rb_title);

    child_widget = RVAL2GTKWIDGET(rb_widget);

    if(!NIL_P(rb_name))
      name = RVAL2CSTR(rb_name);
    if(!NIL_P(rb_title))
      title = RVAL2CSTR(rb_title);

    if (argc == 1) {
        gtk_container_add(RVAL2GTKCONTAINER(self), child_widget);
    } else if (argc == 2) {
        gtk_stack_add_named(_SELF(self),
                            child_widget,
                            name);
    } else if (argc == 3) {
        gtk_stack_add_titled(_SELF(self),
                             child_widget,
                             name, title);
    }

    return self;
}
```