Ticket #1120: 0002-return-a-QualifiedPackageName-not-a-ruby-string.patch

File 0002-return-a-QualifiedPackageName-not-a-ruby-string.patch, 1.3 KB (added by spoonb, 9 years ago)
  • ruby/package_database.cc

    From a5621f4ae8470ba57a28eca8c8267ffc08a15b4a Mon Sep 17 00:00:00 2001
    From: Brett Witherspoon <spoonb@exherbo.org>
    Date: Thu, 17 Feb 2011 17:40:53 -0600
    Subject: [PATCH 2/2] return a QualifiedPackageName not a ruby string
    
    ---
     ruby/package_database.cc |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/ruby/package_database.cc b/ruby/package_database.cc
    index 6a8453a..16f9ad5 100644
    a b namespace 
    6969            { 
    7070                std::shared_ptr<PackageDatabase> * self_ptr; 
    7171                Data_Get_Struct(self, std::shared_ptr<PackageDatabase>, self_ptr); 
    72                 return rb_str_new2(stringify((*self_ptr)->fetch_unique_qualified_package_name( 
    73                                 PackageNamePart(StringValuePtr(argv[0])), 2 == argc ? value_to_filter(argv[1]) : filter::All())).c_str()); 
     72                return qualified_package_name_to_value((*self_ptr)->fetch_unique_qualified_package_name( 
     73                                PackageNamePart(StringValuePtr(argv[0])), 2 == argc ? value_to_filter(argv[1]) : filter::All())); 
    7474            } 
    7575            else 
    7676                rb_raise(rb_eArgError, "fetch_unique_qualified_package_name expects one or two arguments, but got %d",argc);