diff options
author | dakkar <dakkar@thenautilus.net> | 2016-11-10 13:27:18 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2016-11-10 13:39:29 +0000 |
commit | 61f964216b16b25200e2a2ac961f7444c0570daf (patch) | |
tree | a39731665727a5f0a5aaa20c1c8c92a8f1a1ffcc /lib/Data/QRCode/XS.pm | |
parent | try using more magic (diff) | |
download | Data-QRCode-61f964216b16b25200e2a2ac961f7444c0570daf.tar.gz Data-QRCode-61f964216b16b25200e2a2ac961f7444c0570daf.tar.bz2 Data-QRCode-61f964216b16b25200e2a2ac961f7444c0570daf.zip |
split into input / qrcode
Diffstat (limited to 'lib/Data/QRCode/XS.pm')
-rw-r--r-- | lib/Data/QRCode/XS.pm | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/Data/QRCode/XS.pm b/lib/Data/QRCode/XS.pm deleted file mode 100644 index aa8597a..0000000 --- a/lib/Data/QRCode/XS.pm +++ /dev/null @@ -1,47 +0,0 @@ -package Data::QRCode::XS; -use strict; -use warnings; -# ABSTRACT: qrcodes in C -# VERSION -use Data::QRCode::XS::Inline with => 'Alien::QREncode'; -use Data::QRCode::XS::Inline C => ( - 'DATA', - autowrap => 1, - typemaps => 'typemap', -); - -1; - -__DATA__ -__C__ - -int ECLEVEL_L() { return QR_ECLEVEL_L; } -int ECLEVEL_M() { return QR_ECLEVEL_M; } -int ECLEVEL_Q() { return QR_ECLEVEL_Q; } -int ECLEVEL_H() { return QR_ECLEVEL_H; } - -#define CLASS "Data::QRCode" - -QRcode* _build(const char* class, SV* data, int level, int version ) { - unsigned char * str; - STRLEN len; - - str = SvPVutf8(data,len); - return QRcode_encodeData(len,str,version,(QRecLevel)level); -} - -int version(QRcode* self) { - return self->version; -} - -int width(QRcode* self) { - return self->width; -} - -void DESTROY(QRcode* self) { - QRcode_free(self); -} - -int _data_at(QRcode* self, int x, int y) { - return self->data[x+y*self->width]; -} |