[Xapian-tickets] [Xapian] #204: Sort out C# bindings to avoid SWIGTYPE_p_*.cs
Xapian
nobody at xapian.org
Thu Sep 3 22:27:26 BST 2020
#204: Sort out C# bindings to avoid SWIGTYPE_p_*.cs
----------------------------------+-------------------------------
Reporter: Olly Betts | Owner: Olly Betts
Type: defect | Status: new
Priority: normal | Milestone: 1.5.0
Component: Xapian-bindings (C#) | Version: git master
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
----------------------------------+-------------------------------
Changes (by Olly Betts):
* version: SVN trunk => git master
* milestone: => 1.5.0
Comment:
In git master `RangeProcessor` has replaced `ValueRangeProcessor` and
returns a `Query` object, so that one is gone now.
{{{
$ rgrep SWIGTYPE generated-csharp/*.cs
generated-csharp/Compactor.cs: public virtual string
ResolveDuplicateMetadata(string key, uint num_tags, SWIGTYPE_p_std__string
tags) {
generated-csharp/Compactor.cs: string ret =
(SwigDerivedClassHasMethod("ResolveDuplicateMetadata", swigMethodTypes1) ?
XapianPINVOKE.Compactor_ResolveDuplicateMetadataSwigExplicitCompactor(swigCPtr,
key, num_tags, SWIGTYPE_p_std__string.getCPtr(tags)) :
XapianPINVOKE.Compactor_ResolveDuplicateMetadata(swigCPtr, key, num_tags,
SWIGTYPE_p_std__string.getCPtr(tags)));
generated-csharp/Compactor.cs: return ResolveDuplicateMetadata(key,
num_tags, (tags == global::System.IntPtr.Zero) ? null : new
SWIGTYPE_p_std__string(tags, false));
generated-csharp/Compactor.cs: private static global::System.Type[]
swigMethodTypes1 = new global::System.Type[] { typeof(string),
typeof(uint), typeof(SWIGTYPE_p_std__string) };
generated-csharp/QueryParser.cs: public void AddBooleanPrefix(string
field, string prefix, SWIGTYPE_p_std__string grouping) {
generated-csharp/QueryParser.cs:
XapianPINVOKE.QueryParser_AddBooleanPrefix__SWIG_0(swigCPtr, field,
prefix, SWIGTYPE_p_std__string.getCPtr(grouping));
generated-csharp/QueryParser.cs: public void AddBooleanPrefix(string
field, FieldProcessor proc, SWIGTYPE_p_std__string grouping) {
generated-csharp/QueryParser.cs:
XapianPINVOKE.QueryParser_AddBooleanPrefix__SWIG_3(swigCPtr, field,
FieldProcessor.getCPtr(proc), SWIGTYPE_p_std__string.getCPtr(grouping));
generated-csharp/QueryParser.cs: public void
AddRangeprocessor(RangeProcessor range_proc, SWIGTYPE_p_std__string
grouping) {
generated-csharp/QueryParser.cs:
XapianPINVOKE.QueryParser_AddRangeprocessor__SWIG_0(swigCPtr,
RangeProcessor.getCPtr(range_proc),
SWIGTYPE_p_std__string.getCPtr(grouping));
generated-csharp/SWIGTYPE_p_std__string.cs:public class
SWIGTYPE_p_std__string {
generated-csharp/SWIGTYPE_p_std__string.cs: internal
SWIGTYPE_p_std__string(global::System.IntPtr cPtr, bool futureUse) {
generated-csharp/SWIGTYPE_p_std__string.cs: protected
SWIGTYPE_p_std__string() {
generated-csharp/SWIGTYPE_p_std__string.cs: internal static
global::System.Runtime.InteropServices.HandleRef
getCPtr(SWIGTYPE_p_std__string obj) {
}}}
So the current uses are:
* `Compactor::resolve_duplicate_metadata()`'s `tags` parameter - this is a
fairly obscure feature, but ideally `num_tags` and `tags` should map to
some sort of ordered container of strings in the bindings.
* The `grouping` parameter to `QueryParser::add_boolean_prefix()` and
`QueryParser::add_rangeprocessor()` - this is essentially a nullable
string parameter, so that's how it should be wrapped for the bindings.
--
Ticket URL: <https://trac.xapian.org/ticket/204#comment:6>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list