[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Ovirt-devel] [patch] Even Better Exceptions For ruby-libvirt bindings



Just a couple small things:

> diff -r de489d66999d ext/libvirt/_libvirt.c
> --- a/ext/libvirt/_libvirt.c    Mon Mar 31 10:00:40 2008 -0700
> +++ b/ext/libvirt/_libvirt.c    Tue Apr 01 12:52:49 2008 -0400
>  static VALUE m_libvirt;
>  static VALUE c_connect;
> +static VALUE c_vir_error;

This isn't used and can just be removed (together with the definition of
the class in Init_libvirt).

> +/* Errors */
> +static VALUE create_error(VALUE error, char* method, char* msg, 
> +                                virConnectPtr conn){
> +    extern VALUE ruby_errinfo;

clalancette actually spotted this: why is ruby_errinfo extern ?

> +    // create 'libvirt_function_name' and 'vir_connect_ptr'
> attributes on e_Error class
> +    rb_define_attr(e_Error, "libvirt_function_name", 1, 1);
> +    rb_define_attr(e_Error, "vir_error", 1, 1);

Can we call this attribute libvirt_message ? vir_error is kinda generic.

Also, is there any point in having setters for them ? I don't think
that's needed.

David




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]