Re: libceph API

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

 



On Thu, 28 Apr 2011, Colin McCabe wrote:
> > I pushed a patch to master that adds this.  It's now
> >
> >        struct ceph_mount_t;
> >
> > which is sort of annoying: the _t suffix really shouldn't be there.  But
> > if it's just ceph_mount it conflicts with int ceph_mount()...  :/
> >
> > sage
> >
> >
> 
> Well, actually, in C and C++, variables can have the same name as
> types. In other words, the namespaces are separate. Taking advantage
> of this isn't necessarily a good idea, though... parsing in C++ is
> pretty ambiguous already.

In this case it's the function ceph_mount().  I'll make it 
struct ceph_mount_info and typdef ceph_mount_info_t I guess!

sage


> 
> As far as the _t suffix goes, it's used a lot in the Ceph library
> bindings. For example, librados has rados_t, rados_ioctx_t,
> rados_list_ctx_t, and rados_snap_t. librbd has rbd_snap_t and
> rbd_image_t. So although we don't generally use the _t internally, the
> library bindings are generally a _t party (so to speak.)
> 
> cheers,
> Colin
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux