Displaying 10 results from an estimated 10 matches for "qfalse".
Did you mean:
false
2004 Nov 07
2
Problems with DeviceIoControl()
Hi all,
Thanks to Wayne and Park, I''ve got something like this
now:
static VALUE file_set_compressed(VALUE self, VALUE
rbBool){
HANDLE h;
BOOL rv;
DWORD dwBytesReturned;
int fn;
USHORT inBuf = COMPRESSION_FORMAT_DEFAULT;
if((rbBool != Qtrue) && (rbBool != Qfalse)){
rb_raise(rb_eTypeError,"Argument must be true or
false");
}
if(rbBool == Qfalse){
inBuf = COMPRESSION_FORMAT_NONE;
}
fn =
NUM2INT(rb_funcall(self,rb_intern("fileno"),0,0));
h = (HANDLE)_get_osfhandle(fn); // Get HANDLE based
on fileno...
2004 Nov 06
3
Calling CreateFile on an instance of File - possible?
...ng is, I don''t know how to get a valid HANDLE to a instance of an
already opened file. I''ve been trying something like this:
static VALUE file_set_compressed(VALUE self, VALUE rbBool){
DWORD dwAttr;
VALUE rbPath;
HANDLE h;
if((rbBool != Qtrue) && (rbBool != Qfalse)){
rb_raise(rb_eTypeError,"Argument must be true or false");
}
rbPath = rb_funcall(self,rb_intern("path"),0,0);
dwAttr = GetFileAttributes(StringValuePtr(rbPath));
h = CreateFile(
(LPCTSTR)StringValuePtr(rbPath),
FILE_ALL_ACCESS,
FILE_SHARE_...
2005 Aug 21
15
New inheritance
A good number of the samples I have tested are outright or subtly broken
on Windows now. I''m trying to determine what the cause is. Mostly it
seems related to the initialize function not being created when it
should be.
Case in point: ClientDC.i
The caret example won''t work at all because initialize isn''t declared
any longer. If you comment out the import
2017 Feb 02
0
[nbdkit PATCH 2/2] ruby: Support zero callback
...rim (void *handle, uint32_t count, uint64_t offset)
}
static int
+plugin_rb_zero (void *handle, uint32_t count, uint64_t offset, int may_trim)
+{
+ volatile VALUE argv[4];
+
+ argv[0] = (VALUE) handle;
+ argv[1] = ULL2NUM (count);
+ argv[2] = ULL2NUM (offset);
+ argv[3] = may_trim ? Qtrue : Qfalse;
+ exception_happened = 0;
+ last_error = 0;
+ (void) funcall2 (Qnil, rb_intern ("zero"), 4, argv);
+ if (last_error == EOPNOTSUPP ||
+ exception_happened == EXCEPTION_NO_METHOD_ERROR) {
+ nbdkit_debug ("zero falling back to pwrite");
+ nbdkit_set_error (EOPNOTSUP...
2019 Aug 13
0
[nbdkit PATCH 2/2] plugins: Permit ENOTSUP as synonym for EOPNOTSUPP
...and an exception. */
diff --git a/plugins/ruby/ruby.c b/plugins/ruby/ruby.c
index b31f6a4e..ff7932c4 100644
--- a/plugins/ruby/ruby.c
+++ b/plugins/ruby/ruby.c
@@ -420,7 +420,7 @@ plugin_rb_zero (void *handle, uint32_t count, uint64_t offset, int may_trim)
argv[3] = may_trim ? Qtrue : Qfalse;
last_error = 0;
(void) funcall2 (Qnil, rb_intern ("zero"), 4, argv, &exception_happened);
- if (last_error == EOPNOTSUPP ||
+ if (last_error == EOPNOTSUPP || last_error == ENOTSUP ||
exception_happened == EXCEPTION_NO_METHOD_ERROR) {
nbdkit_debug ("zero falli...
2007 Mar 19
0
[898] branches/wxruby2/wxwidgets_282/swig/classes/App.i: Fix init of stock objects for Wx2.8 - was causing infinite loop +crash on OS X
...t;<ins>+ Init_wxRubyStockObjects();
+         VALUE result = rb_funcall(wxRubyApp::app_ptr, rb_intern("on_init"), 0, NULL);
+         if ( result == Qfalse || result == Qnil ) {
+                return false;
+         }
+     ...
2007 May 21
0
[1022] trunk/wxruby2/swig/classes/App.i: Memory mgmt: use Wx::App to mark still-alive Windows, set up Wx::THE_APP const
...PP"));
+         VALUE result = rb_funcall(the_app, rb_intern("on_init"), 0, NULL);
</ins><span class="cx">          if ( result == Qfalse || result == Qnil ) {
</span><span class="cx">                 return false;
</span><span class="cx">   &...
2017 Feb 02
3
[nbdkit PATCH 0/2] Ruby bindings for .zero
Similar to python and perl. But MUCH easier (especially considering
that this is the first time I've every tried to run Ruby). I even
had fun making set_error() polymorphic.
Eric Blake (2):
ruby: Expose nbdkit_set_error to ruby script
ruby: Support zero callback
plugins/ruby/example.rb | 11 ++++++++
plugins/ruby/nbdkit-ruby-plugin.pod | 54
2019 Aug 13
3
[nbdkit PATCH 0/2] errno cleanup patches
I ran into these while trying to prepare patches to add
NBD_CMD_FLAG_FAST_ZERO, which will expose a new NBD_ENOTSUP wire
value.
Eric Blake (2):
plugins: Don't lose original error when emulating FUA
plugins: Permit ENOTSUP as synonym for EOPNOTSUPP
docs/nbdkit-filter.pod | 11 ++++++-----
docs/nbdkit-plugin.pod | 12 +++++++-----
plugins/file/file.c | 16 +++++++++++-----
2007 Feb 16
8
term vector blues
I have a lot of crashes when I try to use term vectors. Here''s an
example, which crashes pretty consistently. This problem seems to be
somewhat sensitive to platform... people on other OS''s and ruby versions
have reported no error. I have seen this with ferret 0.10.13 and 0.10.14
on debian stable using ruby 1.8.2, but I have observed the same problem
on various other systems as