working on it ...

Filters

Explore Public Snippets

Sort by

Found 2,482 snippets matching: c#4.0

    public by sTiLL-iLL @ SniPitz-KND  550009  5  8  16

    Async Queue in C#

    using System;
    using System.Net;
    using System.Threading;
    using System.Threading.Tasks;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    
    public class ParalyzKue
    {
    	readonly object _locker = new object();
    	Task _tail = Task.FromResult (true);
    	
    	public Task Enqueue (Action action)
    	{
    		lock (_locker)
    			return _tail = _tail.ContinueWith (ant => action());
    	}
    
    	public Task<TResult> Enqueue<TResult> (Func<TResult> func)
    	{
    		lock (_locker)
    			return (Task<TResult>) (_tail = _tail.ContinueWith (ant => func()));
    	}
    
    	public Task Enqueue (Func<Task> action)
    	{
    		lock (_locker)
    			return _tail = _tail.Catch().Then (action);
    	}	
    
    	public Task<TResult> Enqueue<TResult> (Func<Task<TResult>> func)
    	{
    		lock (_locker)
    			return (Task<TResult>) (_tail = _tail.Catch().Then (func));
    	}
    }
    
    
    public static class Extensions
    {
    	public static Task<T> Catch<T,TError> (this Task<T> task, Func<TError,T> onError) where TError : Exception
    	{
    		var tcs = new TaskCompletionSource<T> ();
    		task.ContinueWith (ant => {
    			if (task.IsFaulted && task.Exception.InnerException is TError)
    			{
    				tcs.SetResult (onError ((TError) task.Exception.InnerException));
    			}
    			else if (ant.IsCanceled)
    			{
    				tcs.SetCanceled ();
    			}
    			else if (task.IsFaulted)
    			{
    				tcs.SetException (ant.Exception.InnerException);
    			}
    			else
    			{
    				tcs.SetResult (ant.Result);
    			}
    		});
    		return tcs.Task;
    	}		
    	public static Task<T> Catch<T,TError> (this Task<T> task, T onError) where TError : Exception
    	{
    		return task.Catch<T,TError> (ex => onError);
    	}
    	
    	public static Task<T> Catch<T,TError> (this Task task, T onError) where TError : Exception
    	{
    		return task.ToTaskOfT<T>().Catch<T,TError> (onError);
    	}
    
    	public static Task Catch (this Task task)
    	{
    		return task.Catch<object,Exception> (null);
    	}
    	
    	public static Task<T> Catch<T> (this Task<T> task, T valueIfError = default(T))
    	{
    		return task.Catch<T,Exception> (valueIfError);
    	}
    
    	public async static Task<T> ToTaskOfT<T> (this Task t)
    	{
    		await t;
    		return default(T);
    	}
    	
    	public static async Task Then(this Task task, Func<Task> continuation)
    	{
    		await task;
    		await continuation();
    	}
    	
    	public static async Task<TNewResult> Then<TNewResult>(this Task task, Func<Task<TNewResult>> continuation)
    	{
    		await task;
    		return await continuation();
    	}
    	
    	public static async Task Then<TResult>(this Task<TResult> task, Func<TResult,Task> continuation)
    	{
    		await continuation(await task);
    	}
    	
    	public static async Task<TNewResult> Then<TResult, TNewResult>(this Task<TResult> task, Func<TResult, Task<TNewResult>> continuation)
    	{
    		return await continuation(await task);
    	}
    }
    
    /*
    public void doKue()
    {
    	var pcQ = new ParaKue();
    	
      pcQ.Enqueue (() => AsyncMethod1 ("http://www.rotten.com/")).Dump ("Task 1");
    	pcQ.Enqueue (() => AsyncMethod1 ("https://youtube.com/")).Dump ("Task 2");
    	pcQ.Enqueue (() => AsyncMethod1 ("https://yahoo.com/search?q=the cube")).Dump ("Task 3");
      pcQ.Enqueue (() => AsyncMethod1 ("http://www.rotten.com/")).Dump ("Task 4");
    	pcQ.Enqueue (() => AsyncMethod1 ("https://youtube.com/")).Dump ("Task 5");
    	pcQ.Enqueue (() => AsyncMethod1 ("https://www.google.com/search?q=web scrapers")).Dump ("Task 6");
      pcQ.Enqueue (() => AsyncMethod1 ("http://www.rotten.com/")).Dump ("Task 7");
    	pcQ.Enqueue (() => AsyncMethod1 ("https://youtube.com/")).Dump ("Task 8");
    	pcQ.Enqueue (() => AsyncMethod1 ("https://youtube.com/search?q=aliens gods")).Dump ("Task 9");
      pcQ.Enqueue (() => AsyncMethod ("http://www.rotten.com/")).Dump ("Task 10");
    	pcQ.Enqueue (() => AsyncMethod ("https://youtube.com/")).Dump ("Task 11");
    	pcQ.Enqueue (() => AsyncMethod ("https://www.google.com/search?q=javascript")).Dump ("Task 12");
      pcQ.Enqueue (() => AsyncMethod ("http://www.rotten.com/")).Dump ("Task 13");
    	pcQ.Enqueue (() => AsyncMethod ("https://youtube.com/search?q=aliens")).Dump ("Task 14");
      pcQ.Enqueue (() => AsyncMethod ("https://www.yahoo.com/")).Dump ("Task 15");
    	pcQ.Enqueue (() => AsyncMethod ("https://youtube.com/")).Dump ("Task 16");
    	pcQ.Enqueue (() => AsyncMethod ("https://www.google.com/search?q=aliens disclosure")).Dump ("Task 17");
    }
    
    string SyncMethod (string uri)
    {
        var x = new System.Net.WebClient();
        var y = x.DownloadString(uri);
        return y;
    }
    
    async Task<string> AsyncMethod (string uri)
    {
       return await Task.Run(() => new System.Net.WebClient().DownloadStringTaskAsync(uri).Dump());
    }
    
    
    async Task<string> AsyncMethod1 (string uri)
    {
       var x = await new System.Net.WebClient().DownloadStringTaskAsync(uri);
       return x;
    }
    
    */

    public by Aysad Kozanoglu  202242  25  3  0

    fail2ban nginx 404 400 403 444 filter /etc/fail2ban/filter.d/nginx-4xx.conf

    fail2ban nginx 404 400 403 444 filter /etc/fail2ban/filter.d/nginx-4xx.conf : nginxx.conf
    # nano /etc/fail2ban/filter.d/nginx-4xx.conf 
    #
    
    [Definition]
    failregex = ^<HOST>.*"(GET|POST).*" (404|444|403|400) .*$
    ignoreregex =
    
    
    
    

    public by p.kontalis  3106  1  5  0

    CS-Cart 4.2.x: include SKU in Quick Search

    Setting 'Quick Search' to Search by Product Code
    // Go to "app/functions" directory of your CS-Cart installation
    // Open the "fn.catalog.php" file.
    // Find the following part of code:
    //
    $default_params = array (
            'area' => AREA,
            'use_caching' => true,
            'extend' => array('product_name', 'prices', 'categories'),
            'custom_extend' => array(),
            'pname' => '',
            'pshort' => '',
            'pfull' => '',
            'pkeywords' => '',
            'feature' => array(),
            'type' => 'simple',
            'page' => 1,
            'action' => '',
            'filter_variants' => array(),
            'features_hash' => '',
            'limit' => 0,
            'bid' => 0,
            'match' => 'all',
            'tracking' => array(),
            'get_frontend_urls' => false,
            'items_per_page' => $items_per_page,
        );
    //
    // and replace with:
    //
    $default_params = array (
            'area' => AREA,
            'use_caching' => true,
            'extend' => array('product_name', 'prices', 'categories'),
            'custom_extend' => array(),
            'pname' => '',
            'pshort' => '',
            'pfull' => '',
            'pkeywords' => '',
            'feature' => array(),
            'type' => 'simple',
            'page' => 1,
            'action' => '',
            'filter_variants' => array(),
            'features_hash' => '',
            'limit' => 0,
            'bid' => 0,
            'match' => 'all',
            'tracking' => array(),
            'get_frontend_urls' => false,
            'items_per_page' => $items_per_page,
            'pcode_from_q' => 'Y'
        );

    public by Aysad Kozanoglu  1322  1  4  0

    fail2ban jail settings for nginx 400 444 403 404 filtering on http https

    fail2ban jail settings for nginx 400 444 403 404 filtering on http https: fail2ban_jail.conf
    #nano /etc/fail2ban/jail.conf
    #
    [nginx-4xx]
    enabled  = true
    port     = http,https
    filter   = nginx-4xx
    logpath  = /usr/local/nginx/logs/access.log
    maxretry = 4
    
    
    

    public by gwarah  196  2  4  0

    Create a symbolic link with file dialogs

    This script provides an easy way to create file (or folder) symbolic link using zenity file dialogs. requisites: It won't run in case of any restriction related creating symlink command (ln -s ...) or if zenity package wouldn't be installed. The syntax is very simple: crsln.sh [-f|-d] [/path/to/file_or_directory [/path/to/link_name]] [
    #!/bin/bash
    # program     : crsln.sh
    # description : create a symlink with zenity file dialog
    # author      : lp (Luís Pessoa)
    # version     : 0.1.0b
    # syntax      : 
    # 	  crsln.sh [-f|-d] [/path/to/file_or_directory] [/path/to/link_name]] 
    # dependences : 
    #   1) shell: bash  
    #   2) package: zenity
    #   3) see restrictions to create a symlink, man ln
    # history     :
    #   lp; 09/02/2018; first release
    #   lp; 12/12/2017; begin of development
    
    
    # syntax get_file
    function syntax {
        local SINTAX=""
        SINTAX=$1
        SINTAX+="\n syntax: get_file [-t <title>] [ -f <file_or_dir_selected> ] [-l <filters>]"
        SYNTAX+="\n for <filters> rules see: zenity --help-file-selection"
        
        echo -e "Error: ${SINTAX} \n" >&2
        return 1
    }
    
    # syntax script
    function syntax_main {
        local SINTAX=""
        SINTAX=$1
        SINTAX+="\n syntax: create_symlink.sh [-d|-f] [file_or_directory [link_name]]"
        SYNTAX+="\n for <filters> rules see: zenity --help-file-selection"
        
        echo -e "Error: ${SINTAX} \n" >&2
        return 1
    }
    
    # catch a directory or file
    function dir_or_file {
        local opc
        local pkey=""
        RETORNO=0
        
        # 0: zenity; 1: dialog; 2: shell
        local dialog_type=${DIALOG_TYPE}
    
        if [ $dialog_type -eq 0 ]; then
            opc=$(zenity --list  \
                --text "Target is file or directory?" \
                --radiolist  --column "Check" --column "Options" \
                TRUE "file" FALSE "directory" --separator=" ")
            case $? in
            1)
                    echo "Opção deve ser selecionada" >&2
                    return 1
                    ;;
            -1)
                    echo "Ocorreu um erro na seleção de opções"
                    return 1
                    ;;
            esac
        else
            syntax "dialog type not implemented yet."
            return 1
        fi
        
        echo "${opc}"
        return $RETORNO
    }
    
    # catch a directory or file
    function get_file {
        local opt_found=0
        local list_opt=""
        local pkey=""
        
        local fun_text="Choose a file"
        local fun_filename=""
        local fun_filters=""
        local fun_result=""
        
        # 0: zenity; 1: dialog; 2: shell
        local dialog_type=${DIALOG_TYPE}
        local zenity_keys="--file-selection"
        
        # flags
        local flag_dir=0
        
        OPTIND=1
        while getopts ":t:l:f:ds" pkey; do
    
            # verifica se chave já foi chamada
            # excluir chaves que foram chamadas mais de uma vez
            echo "${list_opt}" | grep -q $pkey
            if [ $? -eq 0 ]; then
                syntax "Option -$pkey called twice or more times."
                return 1
            fi
    
            # stored invoked keys
            (( opt_found++ ))
            list_opt="${list_opt};${pkey}"
    
            if [ $opt_found -gt 5 ]; then
                syntax "too many keys"
                return 1
            fi
    
            case "${pkey}" in
                t)
                    fun_text="${OPTARG}"
                    ;;
                f)
                    fun_filename="${OPTARG}"
                    ;;
                l)
                    fun_filters="${OPTARG}"
                    ;;
                d)
                    [ -z "${fun_text}" ] && fun_text="Choose a directory"
                    zenity_keys+=" --directory"
                    flag_dir=1
                    ;;
                s)
                    zenity_keys+=" --save "    
                    ;;    
                \?)
                    syntax "inavalid option: -$OPTARG"
                    return 1
                    ;;
                :)
                    syntax "Option -$OPTARG require argument."
                    return 1
                    ;;
            esac
        done
            
        # zenity_keys+=" --title=\"${fun_text}\" "
        
        if [ -s "${fun_filters}" ]; then
            zenity_keys+=" --file_filter=${fun_filters} "
        fi
        
        if [ -s "${fun_filename}" ]; then
            zenity_keys+=" --filename=${fun_filename} "
        fi
        
        # dialog tool
        if [ $dialog_type -eq 0 ]; then
            fun_result=`zenity --title="${fun_text}" ${zenity_keys}`
            case $? in
            1)
                    echo "No one option selected" >&2
                    return 1
                    ;;
            -1)
                    echo "Error!"
                    return 1
                    ;;
            esac
        else
            syntax "dialog type not implemented."
        fi
        
        echo "${fun_result}"
        return 0
    }
    
    export FILEMAP=""
    export DIRLINK=""
    export LINKNAME=""
    export FLAGTYPE=0
    export TYPEMAP="file"
    export CUR_DIR=`pwd`
    export RETORNO=0
    
    # 
    OPTIND=1
    opt_found=0
    while getopts ":df" pkey; do
        # stored invoked keys
        (( opt_found++ ))
    
        if [ $opt_found -gt 1 ]; then
            syntax_main "too many keys"
            exit 1
        fi
    
        case "${pkey}" in
        d)
             FLAGTYPE=1
             TYPEMAP="directory"
             ;;
        f)
             FLAGTYPE=1
             TYPEMAP="file"
             ;;
        \?)
             syntax_main "invalid key: -$pkey"
             exit 1
             ;;
        esac
    done
    
    # due -d|-f key
    [ $FLAGTYPE -eq 1 ] && shift
    
    # don't change this value!!
    # 0: zenity; 1: dialog; 2: shell
    export DIALOG_TYPE=0
    
    #
    # parameters validation
    #
    [ $# -gt 2 ] && syntax_main "Too many parameters: $#"
    
    # getting file or directory to link
    if [ $# -eq 0 ]; then
        [ $FLAGTYPE -eq 0 ] && TYPEMAP=`dir_or_file` 
        if [ "${TYPEMAP}" = "file" ]; then
            FILEMAP=`get_file -t "Choose any file to link"`
        else
            FILEMAP=`get_file -d -t "Choose any directory to link"`
        fi
    else
        FILEMAP="$1"
    fi 
    
    
    if [ -d "${FILEMAP}" ]; then 
        if [ "${TYPEMAP}" = "file" ]; then
           syntax_main "key set to -f can't link direcory ${FILEMAP}"
        fi
    elif [ -f "${FILEMAP}" ]; then 
        if [ "${TYPEMAP}" = "directory" ]; then
            syntax_main "key set to -d can't link file ${FILEMAP}"
        fi
    else
        syntax_main "Not found or not type regular file or directory: ${FILEMAP}"
        exit 1
    fi
    
    # getting linkname
    if [ $# -lt 2 ]; then
        LINKNAME=`get_file -s -t "Choose the linkname"`
    else
        LINKNAME="${2}"
    fi
    
    # check if ${LINKNAME} already exists file
    if [ -e ${LINKNAME} ]; then  
        if [ -L ${LINKNAME} ]; then
            zenity --question --text="Link ${LINKNAME} already exist. Overwrite it?" --ok-label="Yes" --cancel-label="No"
            if [ $? -ne 0 ]; then
                exit 1 
            fi
        else
            zenity --error --title "error" --text="${LINKNAME} already exist as file or directory"
            exit 1 
        fi    
    fi
    # link
    echo ""
    echo "---------------"
    echo "${TYPEMAP} : ${FILEMAP} "
    echo "link : ${LINKNAME} "
    
    echo ""
    echo "Press a key to continue or [ctrl]+c to exit " ; read
    ln -s -r "${FILEMAP}" "${LINKNAME}"
    [ $? -gt 0 ] && echo "failure!" && exit 1
    
    echo "sucess!"
    exit $RETORNO
    																																																

    public by msdn  1234  0  5  0

    GetStaticPropertyValue: Returns the value of a static property. The name of the property is passed by using <see cref="CallerMemberName"/> (for .NET version >= 4.5).

    Returns the value of a static property. The name of the property is passed by using (for .NET version = 4.5). Type of the return value. Name of the calling method. The property value.
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Reflection;
    using System.Runtime.CompilerServices;
    using System.Threading.Tasks;
    
    /// <summary>
    /// Gets / sets the declared proporties for later use, in case static properties should be accessed.
    /// </summary>
    private static IEnumerable<PropertyInfo> DeclaredProperties { get; set; }
    /// <summary>
    /// Gets / sets the declared proporties for later use, in case static properties should be accessed.
    /// </summary>
    private static IEnumerable<PropertyInfo> DeclaredProperties { get; set; }
    /// <summary>
    /// Gets / sets the declared methods for later use, in case static methods should be accessed.
    /// </summary>
    private static IEnumerable<MethodInfo> DeclaredMethods { get; set; }
    
    /// <summary>
    /// Static initialization.
    /// </summary>
    static PrivateAccessorBase()
        {
          // Get the type info.
          TypeInfo typeInfo = typeof(T).GetTypeInfo();
    
          // Get the declared properties for later use, in case static properties should be accessed.
          PrivateAccessorBase<T>.DeclaredProperties = typeInfo.DeclaredProperties;
    
          // Get the declared methods for later use, in case static methods should be accessed.
          PrivateAccessorBase<T>.DeclaredMethods = typeInfo.DeclaredMethods;
        }
    
    #endregion Protected Methods
    
    
    #region Protected Static Methods
    
    /// <summary>
    /// Returns the value of a static property. The name of the property is passed by using <see cref="CallerMemberName"/> (for .NET version >= 4.5).
    /// </summary>
    /// <typeparam name="TReturnValue">Type of the return value.</typeparam>
    /// <param name="callerName">Name of the calling method.</param>
    /// <returns>The property value.</returns>
    protected static TReturnValue GetStaticPropertyValue<TReturnValue>
      (
      [CallerMemberName] string callerName = null
      )
    {
      // Find the property having the matching name and get the value
      return ((TReturnValue)PrivateAccessorBase<T>.DeclaredProperties.Single(info => info.Name.Equals(callerName)).GetValue(null));
    }

    public by msdn  963  0  5  0

    SetStaticPropertyValue: Sets the value of a static property. The name of the property is passed by using <see cref="CallerMemberName"/> (for .NET version >= 4.5).

    Sets the value of a static property. The name of the property is passed by using (for .NET version = 4.5). The value to be set. Name of the calling method.
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Reflection;
    using System.Runtime.CompilerServices;
    using System.Threading.Tasks;
    
    /// <summary>
    /// Gets / sets the declared proporties for later use, in case static properties should be accessed.
    /// </summary>
    private static IEnumerable<PropertyInfo> DeclaredProperties { get; set; }
    /// <summary>
    /// Gets / sets the declared proporties for later use, in case static properties should be accessed.
    /// </summary>
    private static IEnumerable<PropertyInfo> DeclaredProperties { get; set; }
    /// <summary>
    /// Gets / sets the declared methods for later use, in case static methods should be accessed.
    /// </summary>
    private static IEnumerable<MethodInfo> DeclaredMethods { get; set; }
    
    /// <summary>
    /// Static initialization.
    /// </summary>
    static PrivateAccessorBase()
        {
          // Get the type info.
          TypeInfo typeInfo = typeof(T).GetTypeInfo();
    
          // Get the declared properties for later use, in case static properties should be accessed.
          PrivateAccessorBase<T>.DeclaredProperties = typeInfo.DeclaredProperties;
    
          // Get the declared methods for later use, in case static methods should be accessed.
          PrivateAccessorBase<T>.DeclaredMethods = typeInfo.DeclaredMethods;
        }
    
    /// <summary>
    /// Sets the value of a static property. The name of the property is passed by using <see cref="CallerMemberName"/> (for .NET version >= 4.5).
    /// </summary>
    /// <param name="value">The value to be set.</param>
    /// <param name="callerName">Name of the calling method.</param>
    protected static void SetStaticPropertyValue
      (
      object value,
      [CallerMemberName] string callerName = null
      )
    {
      // Find the property having the matching name and set the value
      PrivateAccessorBase<T>.DeclaredProperties.Single(info => info.Name.Equals(callerName)).SetValue(null, value);
    }

    external by xtarx  384993  16  4  0

    Cordova File Choose issue on Android 4.4.2 and 4.3

    Cordova File Choose issue on Android 4.4.2 and 4.3: Cordova File Choose issue Android.md
    # Cordova File Choose issue on Android 4.4.2 and 4.3
    
    ### Issue
    
    openFileChooser not called when ``<input type="file">``
     is clicked on android 4.4 webview	
    
      
    ### Offical 
    * [apacheIssue] - Issue on Apache's Cordova
    * [androidIssue] - awesome web-based text editor
    
    ### Possible Solutions : 
    
    Unfortunately no solutions were officially provided from cordova or android. The following solutins are based on community efforts.
    * [solA] - Solution A : Using Android's FileChooser Native plugin 
    * [solB] - Solution B :Using Android's FileChooser workaround specific for this issue
    
    ### Drawbacks
    
     - Solution A is 2 years old 
     - Solution B is poorly Documented and lots of ambiguity in instructions
     - Both Solutions are not widely tested
    
    [apacheIssue]:https://issues.apache.org/jira/browse/CB-5294
    [androidIssue]:https://code.google.com/p/android/issues/detail?id=62220
    
    [solA]:https://github.com/don/cordova-filechooser
    [solB]:https://github.com/cdibened/filechooser
    
    
    
    

    external by rectang  261  0  3  0

    Interdiff from CLOWNFISH-47-fix-final-methods to CLOWNFISH-47-fix-final-methods-v2

    Interdiff from CLOWNFISH-47-fix-final-methods to CLOWNFISH-47-fix-final-methods-v2: gistfile1.diff
    diff --git a/compiler/src/CFCBindMethod.c b/compiler/src/CFCBindMethod.c
    index f6ff216..925f481 100644
    --- a/compiler/src/CFCBindMethod.c
    +++ b/compiler/src/CFCBindMethod.c
    @@ -25,6 +25,7 @@
     #include "CFCVariable.h"
     #include "CFCSymbol.h"
     #include "CFCClass.h"
    +#include "CFCParcel.h"
     
     #ifndef true
       #define true 1
    @@ -51,9 +52,9 @@ S_virtual_method_def(CFCMethod *method, CFCClass *klass) {
     
     char*
     CFCBindMeth_method_def(CFCMethod *method, CFCClass *klass) {
    -    // If the method is final and the implementing function is in the same
    -    // parcel as the invocant, we can optimize the call by resolving to the
    -    // implementing function directly.
    +    // If the method is final and the class where it is declared final is in
    +    // the same parcel as the invocant, we can optimize the call by resolving
    +    // to the implementing function directly.
         if (CFCMethod_final(method)) {
             CFCClass *ancestor = klass;
             while (ancestor && !CFCMethod_is_fresh(method, ancestor)) {
    @@ -94,27 +95,35 @@ S_method_def(CFCMethod *method, CFCClass *klass, int optimized_final_meth) {
         const char *ret_type_str = CFCType_to_c(return_type);
         const char *maybe_return = CFCType_is_void(return_type) ? "" : "return ";
     
    -    char *innards;
    +    const char innards_pattern[] =
    +        "    const %s method = (%s)cfish_obj_method(%s, %s);\n"
    +        "    %smethod(%s);\n"
    +        ;
    +    char *innards = CFCUtil_sprintf(innards_pattern, full_typedef,
    +                                    full_typedef, self_name, full_offset_sym,
    +                                    maybe_return, arg_names);
         if (optimized_final_meth) {
    +        CFCParcel  *parcel = CFCClass_get_parcel(klass);
    +        const char *privacy_sym = CFCParcel_get_privacy_sym(parcel);
             char *invoker_cast = CFCUtil_strdup("");
             if (!CFCMethod_is_fresh(method, klass)) {
                 CFCType *self_type = CFCMethod_self_type(method);
                 invoker_cast = CFCUtil_cat(invoker_cast, "(",
                                            CFCType_to_c(self_type), ")", NULL);
             }
    -        const char pattern[] = "    %s%s(%s%s);\n";
    -        innards = CFCUtil_sprintf(pattern, maybe_return, full_imp_sym,
    -                                  invoker_cast, arg_names);
    -        FREEMEM(invoker_cast);
    -    }
    -    else {
             const char pattern[] =
    -            "    const %s method = (%s)cfish_obj_method(%s, %s);\n"
    -            "    %smethod(%s);\n"
    +            "#ifdef %s\n"
    +            "    %s%s(%s%s);\n"
    +            "#else\n"
    +            "%s"
    +            "#endif\n"
                 ;
    -        innards = CFCUtil_sprintf(pattern, full_typedef, full_typedef,
    -                                  self_name, full_offset_sym, maybe_return,
    -                                  arg_names);
    +        char *temp = CFCUtil_sprintf(pattern, privacy_sym,
    +                                     maybe_return, full_imp_sym,
    +                                     invoker_cast, arg_names, innards);
    +        FREEMEM(innards);
    +        innards = temp;
    +        FREEMEM(invoker_cast);
         }
    
    

    external by Github  148  0  2  0

    A company car <a href=" http://www.suristage.com/where-can-i-buy-flagyl-500mg-online.pptx#furs ">can flagyl be used to treat uti</a> Japanese Ground Self-Defense Force's 1st Airborne Brigade soldiers walks toward to a CH-47 helicopter for parachute dr...

    A company car can flagyl be used to treat uti Japanese Ground Self-Defense Force's 1st Airborne Brigade soldiers walks toward to a CH-47 helicopter for parachute drop training during their military drill at Higashifuji training field in Susono, west of Tokyo, July 8, 2013. : Antoine
    A company car <a href=" http://www.suristage.com/where-can-i-buy-flagyl-500mg-online.pptx#furs ">can flagyl be used to treat uti</a>  Japanese Ground Self-Defense Force's 1st Airborne Brigade soldiers walks toward to a CH-47 helicopter for parachute drop training during their military drill at Higashifuji training field in Susono, west of Tokyo, July 8, 2013.
     
    
    
    • Public Snippets
    • Channels Snippets